Solved! Go to Solution.
You're right, there should be at least note or warning on this topic. We are sorry about it.
We found out this "spurious problem" around MQX 3.4 release and we were quite shocked too.
So there are two "solutions":
1) install dummy interrupt handler for spurious interrupt using _int_install_kernel_isr()
2) use _int_disable() and _int_enable() around each interrupt enable register bit clearing (disabling)
PetrM
You're right, there should be at least note or warning on this topic. We are sorry about it.
We found out this "spurious problem" around MQX 3.4 release and we were quite shocked too.
So there are two "solutions":
1) install dummy interrupt handler for spurious interrupt using _int_install_kernel_isr()
2) use _int_disable() and _int_enable() around each interrupt enable register bit clearing (disabling)
PetrM
I actually inserted protection in both the mask and unmask functions of the BSP, like this:
/* Save the status register and set the interrupt level to 7 (disable) */ uSaveSR = _psp_get_sr(); (void)_psp_set_sr(uSaveSR | 0x0700); mask = *maskr & ~clear; *maskr = mask & ~bit; /* Restore the previous value of the status register */ (void)_psp_set_sr(uSaveSR);
Maybe you can put that in MQX 3.5.
Thanks!
FWIW,
Johan