cancel
Showing results for 
Search instead for 
Did you mean: 

systick handler keep pending on stm32h7 board.

sheng yang
Associate III

I made a project with stm32h7 board, and use pemicro multlink to debug it under keil. I found it keep in systick handler pending but no active.

I checked systick module register as:

shengyang_0-1725578415036.png

the counter is changed.

and then I checked SCB releate registers as

shengyang_1-1725578563853.png

and the interrupt handler addr is as

shengyang_2-1725578660534.png

matched with vector config as:

shengyang_3-1725578726103.png

 

I don't know where is wrong ?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Only so many reasons why an interrupt is not happening. Go down the list and verify them all:

  • Interrupts need to be enabled globally (they are by default, use __enable_irq()).
  • SysTick interrupt needs to be enabled (in SysTick->CTRL)
  • Execution cannot be in an equal or higher priority interrupt (print out SCB registers).

Viewing values in a register viewer (e.g. the SFR window in STM32CubeIDE) will be easier to navigate than viewing raw memory and translating.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
TDK
Guru

Only so many reasons why an interrupt is not happening. Go down the list and verify them all:

  • Interrupts need to be enabled globally (they are by default, use __enable_irq()).
  • SysTick interrupt needs to be enabled (in SysTick->CTRL)
  • Execution cannot be in an equal or higher priority interrupt (print out SCB registers).

Viewing values in a register viewer (e.g. the SFR window in STM32CubeIDE) will be easier to navigate than viewing raw memory and translating.

If you feel a post has answered your question, please click "Accept as Solution".

1. I have checked SysTick->CTRL = 0X7 so SysTick interrupt has beed enabled. 

2. Execution cannot be in an equal or higher priority interrupt (print out SCB registers)  I wonder which register do you mean ? and I have print these registers in the picture below.

3. Interrupts need to be enabled globally (they are by default, use __enable_irq()) I will check this later with PRIMASK , FAULTMASK, BASEPRI..

 

> 2. Execution cannot be in an equal or higher priority interrupt (print out SCB registers)  I wonder which register do you mean ? and I have print these registers in the picture below.

Mainly SCB->ICSR, which contains VECTACTIVE. Should also get this information by looking at the call stack.

If you feel a post has answered your question, please click "Accept as Solution".

I'm sorry replay so late, later I found the reason is that I disabled irq before with.

CPSID   I