Hello TI Experts,
According to the requirements of our project, we need to add a critical section protection mechanism to the code, after querying the sys/BIOS user's guide document, we determine that the critical section protection is achieved by calling the Hwip_disable() to close all interrupts when entering the critical section, and using the Hwip_restore() to open all interrupts when leaving the critical section, as shown in the following code:
uintptr_t gatekey;
gatekey = HwiP_disable();
/*critical section code*/
HwiP_restore(gatekey);
But during the validation process, we found that interrupt can still run after calling the Hwip_disable() function.
In addition, it is possible to close a specific interrupt by calling the function HwiP_disableInterrupt (int32_t interruptNum).
I wonder why the HwiP_disable() function doesn't work, and how to fix it.Thank you in advance!