/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Non-intrusive debugging note/question

Username:     
Password:     
             

Forum

# 1   2011-05-02 21:32:39 Non-intrusive debugging note/question

pfandler
Member
From: Hungary
Registered: 2011-02-16
Posts: 26

Non-intrusive debugging note/question

Hi,

I experienced that debugging STM32 interrupts is not an easy job. I have set up 3 timer interrupts with different priorities and different timings, and set breakpoints to the beginning of each IT subroutine.

As the program reaches the BKPT in the highest prio IT handler, I saw that the other Timer IT handlers are also waiting for execution, because the timers don't stop during debug, so they trigger their respective Update interrupt. Despite this, when I let the program run, it stops at the same - highest prio - IT subroutine again, as if the lower prio ITs weren't waiting for execution.

The BKPTs in the lower prio IT handlers are only reached when I disable the BKPT in the higher prio IT handler.

Why will only the breakpoint in the highest priority IT handler be reached?

Thanks, Peter

Offline

 

# 2   2011-05-09 10:01:34 Non-intrusive debugging note/question

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Non-intrusive debugging note/question

Peter,
I have no answer for your question, but note that you can configure the behavior of timers when breakpoint is reached by configuring the register : DBGMCU_CR at address: 0xE0042004.
Yves

Offline

 

# 3   2011-05-14 18:45:12 Non-intrusive debugging note/question

pfandler
Member
From: Hungary
Registered: 2011-02-16
Posts: 26

Re: Non-intrusive debugging note/question

Hi Yves,

thanks very much for your reply! It was the right hint to find the solution!

I inserted some lines at the start of my code so that all timers in question will be stopped during debug. After this the breakpoints in the timer interrupts were reached in the right order as expected.

It works in step over mode and run mode too.

So thanks again for your valuable support!

Peter

Last edited by pfandler (2011-05-14 18:45:51)

Offline

 

Board footer