cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 : how to know if EXTI comes from SWI ?

Jean-Marc Chiappa
Associate

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

Just set a flag before raising the SWI in software, then check & clear it in the handler ?

 

View solution in original post

2 REPLIES 2
Pavel A.
Evangelist III

Just set a flag before raising the SWI in software, then check & clear it in the handler ?

 

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.