2025-01-09 09:12 AM
Hello,
I have used to read EXTI.SWIER1 to know if interrupt comes from SWI or external. But it seems that WB55 doesn't allow to read anymore the SWIER1 register. The RM notices that reading SWIER1 returns always '0'.
So my question is : How to know the source of the interrupt ?
EXTI.PR1 indicates an interrupt is pending but it is not very discriminant.
Solved! Go to Solution.
2025-01-09 03:29 PM
Just set a flag before raising the SWI in software, then check & clear it in the handler ?
2025-01-09 03:29 PM
Just set a flag before raising the SWI in software, then check & clear it in the handler ?
2025-01-09 10:58 PM
Hi Pavel
Thank you for your reply. Indeed, this is an applicative solution. But the underneath question was why the behaviour of some registers changes between MCU (for general purpose functions) ?
Moreover, the SWIERx register is stamped as RW... but read returns always '0'... ahah.
I was quite reticent to use global variable and a builtin solution would be more acceptable. Anyway, it seems that there's no other way.