Hi,
I was looking at the code for enabling/disabling interrupts and I'm using code like in this post:
http://e2e.ti.com/support/microcontrollers/hercules/f/312/t/100109.aspx#353088
I'm wondering if there are any potential issues with mixing the usage of these macros in interrupt and non-interrupt code execution or any other potential hazards regarding the CPSR state. In our system, we are only using supervisor mode and we never enter user mode. So we call these _Enable_Irq() and _Disable_Irq() functions from normal code not running in interrupts. I see that there is a read/modify/write in these functions, so there is a potential for an interrupt to occur and change the CPSR after the read instruction, so that after the interrupt finishes, we are now writing back a potentially wrong value to the CPSR. Is this something that can happen in the system as I have described?
Thanks,
Marco