cancel
Showing results for 
Search instead for 
Did you mean: 

If the bit in Pending Register of STM32 is not cleared.

JTOM.1
Associate II

If the bit in Pending Register of STM32 is not cleared.

Will interrupts trigger all the time?

Will the Interrupt service function always run?

3 REPLIES 3

You mean, pending register in NVIC?

It gets cleared automatically by hardware at the end of the respective ISR (if the original stimulus from some of the programs, which caused it, is not still active).

JW

not NVIC.

The pending register not in core peripheral.

It is in system peripheral. (0x4001 3C00 - 0x4001 3FFF EXTI on APB2 bus.stm32f7)

The user manual does not say that this pending register will be cleared automatically and that you need to write 1 inside to clear interrupts.

If I don't write the 1 to there, Will the interrupt be going to be triggered all the time?

berendi
Principal

Yes, you are supposed to clear it in the EXTI interrupt handler, otherwise it will keep triggering the interrupt.

It would take some unspecified amount of time until clearing it propagates to the NVIC logic, so make sure that the interrupt handler function handles the case properly when the EXTI pending bit is no longer set, i.e. return immediately.