SPRUIM2H May 2020 – October 2023 AM2431 , AM2432 , AM2434 , AM6411 , AM6412 , AM6421 , AM6422 , AM6441 , AM6442
The General Purpose mode supports 3 tasks - Task0 (default, or background, task), Task1, and Task2. Figure 6-212 shows the basic state machine associated with these tasks.
Task2 has highest priority, Task1 has middle priority, and Task0 has lowest priority. As such, a Task2 event always preempts Task1 or Task0, if either is active. A Task1 event always preempts Task0, if active. To exit out of the current state or task, software must issue a “software completion of task” using XIN and a device ID of 252.
Task2 and Task1 support up to five sub-tasks (S0-S4), which are enabled or disabled in the ICSSG_GLOBAL_CFG register. Figure 6-213 and Figure 6-214 show the state machines for entering into these sub-tasks, and the priority of these sub-tasks are as follows:
Note that the subtasks can only be preempted by a higher priority task. However, they cannot be preempted by another subtask within the same task. For example, T1_S4 can be preempted by T2_S3. However, T1_S4 cannot be preempted by T1_S3.
In general purpose mode, the source event for each sub-task is ICSSG_TS1_GEN_CFG1/ ICSSG_TS1_GEN_CFG2 and ICSSG_TS2_GEN_CFG1/ ICSSG_TS2_GEN_CFG2 registers defines the source of the event which will trigger the Task1 and Task2 sub-tasks.
Table 6-439 shows the mapping.
All source events should be cleared before any update to the mapping.
ICSSG_TS1_GEN_CFG1/ ICSSG_TS1_GEN_CFG2 and ICSSG_TS2_GEN_CFG1/ ICSSG_TS2_GEN_CFG2 | Source Event |
---|---|
0 | RX_SOF |
1 | RX_BK1 |
2 | RX_BK2 |
3 | RX_BKN |
4 | RX_EOF |
5 | 1h |
6 | TX_L1_L2_WM |
7 | TX_L2_EMPTY & TX_L2_EOF_PEND |
8 | TX_UNDER_RX_OVER_ERR |
9 | PR1_MDIO_LINKINT[0] (from MDIO) |
10 | PR1_MDIO_LINKINT[1] (from MDIO) |
11 | PR1_EDC0_SYNC0_OUT |
12 | PR1_EDC0_SYNC1_OUT |
13 | PR1_EDC1_SYNC0_OUT |
14 | PR1_EDC1_SYNC1_OUT |
15 | 1h |
31-16 | IEP0_CMP[15:0] |
37-32 | IEP0_CAPR[5:0] |
39-38 | IEP0_CAPRF[1:0] |
55-40 | IEP1_CMP[15:0] |
61-56 | IEP1_CAPR[5:0] |
63-62 | IEP1_CAPRF[1:0] |
127-64 | SPINLOCK_FEED_REQ[63:0](1) |
135-128 | INTC_HOST_OUT[7:0] |
143-136 | INTC_HOST_TASKMGR_REQ[7:0] |
145-144 | RTU_PDSP_INTR_IN[1:0] (2) |
147-146 | PR1_PDSP_INTR_IN[1:0] |
148 | xfr_vbus_rd_data_rx0_req (data rdy) |
149 | xfr_vbus_rd_data_rx1_req (data rdy) |
150 | xfr_vbus_rd_data_rx2_req (data rdy) |
151 | (tx_l2_empty & (tx_l1_occ[6:0] == (tx_wm_lvl + 7'b1))) | (tx_l2_empty & (tx_l1_occ[6:0] < (tx_wm_lvl + 7'b1)) & tx_l1_eof_pend) |
255-148 | Reserved |