|
|||||||||||
|
Technical Support Support Resources
Product Information |
C166: Interrupt Behaviour on Infineon XC16X DevicesInformation in this article applies to:
QUESTIONI have problems disabling a timer interrupt on Infineon XC16x devices. The following sequence was successfully used on classic C16x devices, but appears to fail on the new Infineon XC16x:
It appears that this sequence does not protect my code from Timer 2 interrupts. When I change the code to the following sequence, it seems to work as expected:
It seems to be essential that PSW.IEN is cleared during this sequence. Is there a better solution? Does this also affect my Real-Time Operating Systems? ANSWERYour work-around sequence executes correctly on the XC16x. A read back of the IE (Interrupt Enable) flag is a better method and may be implemented in C with:
This sequence ensures that the IE flag is clear when the interrupt system is re-enabled. In contrast to classic C16x/ST10 devices, some of the old pipeline effects are solved in the new C166 V2 core (that is used by the XC161, XC164, and XC167 devices). Now, resetting PSW.IEN is immediately effective (no interrupt will happen afterwards). The old workarounds (documented for C16x/ST10 core) are still OK on XC16x devices. However, the Infineon C166 V2 core (which is used in the XC161, XC164, and XC167 devices) serves interrupts after ATOMIC when a single IE flag is disabled within the ATOMIC sequence. The interrupt module processes interrupts very early and delays execution just for the ATOMIC sequence. Note: The assignment IEN=0 must not be part of an ATOMIC sequence. If it is, the interrupt request is delayed until the end of the ATOMIC sequence. Important: The change in the interrupt behaviour of XC16x may affect several Real-Time Operating Systems.
MORE INFORMATION
SEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
|||||||||||
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.