cancel
Showing results for 
Search instead for 
Did you mean: 

Software interrupt with STM32

Roman REITER
Associate III

Hi there,

I'm trying to implement a software interrupt using the STM32L432KC. I want to trigger an interrupt when I reach a certain point in the code. Unfortunately I didn't find any helpful example.

Once I tried to set bit37 in the IMR2 register.

SET_BIT(EXTI->IMR2 , EXTI_IMR2_IM37_Msk);

and am assumed that when setting the same bit by name in the SWIER register triggers the interrupt.

SET_BIT(EXTI->SWIER2 , EXTI_SWIER2_SWI37_Msk);

But it doesn't work. The program does not jump into the function

void SVC_Handler (void)

Can someone explain to me how to do this!?

1 ACCEPTED SOLUTION

Accepted Solutions
Javier1
Principal

Software Trigger Interrupt Register (STIR)

https://stackoverflow.com/questions/44482964/using-exti-line-for-software-interrupt

we dont need to firmware by ourselves, lets talk

View solution in original post

1 REPLY 1
Javier1
Principal

Software Trigger Interrupt Register (STIR)

https://stackoverflow.com/questions/44482964/using-exti-line-for-software-interrupt

we dont need to firmware by ourselves, lets talk