Skip to main content
Roman REITER
Associate III
January 19, 2022
Solved

Software interrupt with STM32

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!?

This topic has been closed for replies.
Javier1
Javier1Best answer
Principal
January 19, 2022

Software Trigger Interrupt Register (STIR)

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

hit me up in https://www.linkedin.com/in/javiermuñoz/

1 reply

Javier1
Javier1Best answer
Principal
January 19, 2022
hit me up in https://www.linkedin.com/in/javiermuñoz/