Skip to main content
MSamy.1
Associate II
Oct 12, 2021 7:07 AM UTC
Question

Interrupts not working when using openOCD cubeIDE

I’m using cubeIDE and openOCD to debug on stm32f103. The interrupts not called although the interrupt flags are set. I tried to use GDB and they works fine for the same SW on the same board.

So how to make then working using openOCD?

I checked google and there are threads recommends using different startup code but I checked it and vector table seems to be ok and worked using GDB with the same startup code.

This topic has been closed for replies.

3 replies

TDK
Oct 13, 2021 3:51 AM UTC

In order for an interrupt to fire:

  • It must be enabled in the peripheral
  • It must be enabled in NVIC
  • Interrupts must be globally enabled.
  • The main thread must be active or the interrupt needs to have preempt priority over the currently executing code.

Check those things.

"If you feel a post has answered your question, please click ""Accept as Solution""."
MSamy.1
MSamy.1Author
Associate II
Oct 13, 2021 5:25 AM UTC

All of them are ok. As I said the Interrupts are working when using GDB so no SW issue.

TDK
Oct 13, 2021 1:51 PM UTC
Not sure. I don't see how the hardware would act differently based on the debugger that is connected.
"If you feel a post has answered your question, please click ""Accept as Solution""."