SPRUIY2A November 2024 – March 2025 F29H850TU , F29H859TU-Q1
The Decode Phase Status Register (DSTS) contains information regarding the interrupt and link status of the CPU. The following table highlights fields related to interrupt operation. This information is used by software for building predictable priority and security behavior.
| - | RLINK | ISR_PRIORITY | INTS | INTE | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| TA3 | TA2 | TA1 | TA0 | - | CLINK | DBGM | - | - | A.ZV | A.C | A.N | A.Z | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Return Link (RLINK): This represents the LINK of the origin from where the protected return was executed.
ISR Priority (ISR_PRIORITY): If CPU is servicing an interrupt and INTS is either INT or RTINT, then the priority level of the interrupt is reflected in this field. This is an 8 bit register field.
Interrupt status (INTS): This field tracks the status of CPU execution, specifying whether the execution is in the main loop, in an NMI ISR, in an RTINT ISR, or in an INT ISR. This field is also used by the external PIPE module to track the present phase of CPU to decide when the next ready RTINT or INT interrupt can be forwarded to CPU. See Table 3-3 for details on the status values of the INTS field.
| INTS[1] | INTS[0] | CPU State | Comment |
|---|---|---|---|
| 0 | 0 | Main code | Not in any task, interrupt or exception |
| 0 | 1 | INT Handler | In a normal interrupt service routine |
| 1 | 0 | RTINT Handler | In a real-time interrupt service routine |
| 1 | 1 | NMI Handler | In a NMI handler routine |
INT Enable (INTE): The INT enable bit reflects whether an INT interrupt can be accepted by the CPU or not. This bit needs to be 1 to allow the next higher priority INT to be accepted in the CPU (which allows nesting of INTs). Upon accepting INT, this bit gets automatically set to 0 and so ISR code needs to explicitly set this back to 1 to enable INT interrupt nesting.
Caller Link (CLINK): The CLINK field represents the LINK of the origin which made a call to execute the function. This includes execution calls from ISRs.
To enhance security, the CLINK field can be checked within a given ISR (or function) to determine if the CLINK field matches a predefined Link. The ISR (or function) can then exit automatically, if the Link does not match.