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.

TDA4VM: HwiP_disable()函数不生效

Part Number: TDA4VM

根据项目需求,我们要在代码中增加临界区保护机制,查询sys/bios user‘s guide文档后,我们确定采用进入临界区时调用Hwip_disable()关闭中断,出临界区时使用Hwip_restore()开启中断的方式实现临界区保护,具体的实现方式如下列代码所示。

uintptr_t gatekey;

gatekey = HwiP_disable();

/*critical section code*/

HwiP_restore(gatekey);

但是在验证过程中,我们发现调用Hwip_disable()函数后,中断仍然可以运行,没有被禁止。

另外,我们使用关闭特定中断的函数HwiP_disableInterrupt(int32_t interruptNum)去关闭指定的中断是可以的。

想问下TI工程师和各位大神,能否确定HwiP_disable()函数不起作用的原因和对应的解决方法,谢谢!