This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2x : MaskingOption_ALL vs hwi_disable()

Other Parts Discussed in Thread: SYSBIOS

Hello

I am working on TDA2x with sysbios 6.

I have faced an interesting problem where  an ISR running (DSP) is preempted by another ISR and  both these ISR's are invoked by the hardware interrupts. One of the hardware interrupt is caused by mailbox module between  DSP and IPU and other by the DSP and EVE.

Unfortunately, both these ISR's share a critical section and thus the data corruption happens.

When i try using a HWI_disable() and HWI_enable() at the start of ISR routines then everything works fine.Also when i use MaskingOption_ALL in BIOS configuration of HWI things work fine but not with the default option MaskingOption_SELF.

My question is :

Q1. Is MaskingOption_ALL is fundamentally same as hwi_disable()?

Q2. If not then what is a better option to use and Why? 

Q3. In case my critical section in ISR is small, then can i use  hwi_disable() instead of  MaskingOption_ALL (assuming later is better fundamentally).

Regards

Abhishek