cancel
Showing results for 
Search instead for 
Did you mean: 

Software interrupt doesn't work

z1060
Associate II
Posted on September 30, 2016 at 13:41

Hello!

I use STM32F429ZI and I try to set a software interrupt, but it doesn't work.

I set it as follows:

    EXTI->IMR |= EXTI_IMR_MR0;

 

    NVIC_SetPriority(EXTI0_IRQn, 15);

 

    NVIC_EnableIRQ(EXTI0_IRQn);

 

    

 

   

 

    __HAL_GPIO_EXTI_GENERATE_SWIT(EXTI_SWIER_SWIER0);

 

 

void EXTI0_IRQHandler (void)

 

{

 

    SET(TEST_X2);//test point

 

}

 

 

Software interrupt is not trigered. Help me please. Am I missing something?

Thank you for your help.

3 REPLIES 3
Posted on September 30, 2016 at 15:13

SYSCFG clock enabled?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
slimen
Senior
Posted on September 30, 2016 at 15:35

Hello,

Make sure you've configured the pins, and that the GPIO and SYSCFG clocks are enabled.

Regards

z1060
Associate II
Posted on September 30, 2016 at 15:38

Yes, I use __HAL_RCC_SYSCFG_CLK_ENABLE(); in HAL_GPIO_Init