cancel
Showing results for 
Search instead for 
Did you mean: 

unacceptable timer behaviour

rasmusbunkenborg
Associate II
Posted on November 20, 2008 at 09:21

unacceptable timer behaviour

3 REPLIES 3
rasmusbunkenborg
Associate II
Posted on May 17, 2011 at 12:52

Hey

I'm using the stm32f103 and trying to use timer3 as a prescaler for timer1. Everytime timer 3 overflows, it makes timer1 count one up. Or at least that is how I intended it.Usually this works like it should, but sometimes timer1 increased its counter by 2, ,and in rare cases more, instead of just one when timer3 overflows. This I do not understand. could there be something that triggers timer1 besides timer3, or can trgo signal appear out of nowhere? Any hints or ideas are very welcome.

Cheers

Rasmus

[ This message was edited by: rasmusbunkenborg on 19-11-2008 10:36 ]

rasmusbunkenborg
Associate II
Posted on May 17, 2011 at 12:52

I'm starting to think that the problem is caused by the debugger. I'm using the keil debugger from uvision. It appears that it keeps counting when it reaches a breakpoint. I tried halting the timers through the DBGMCU_CR register, but that doensent seem to work. Do any of you have an idea where i could stop them, or if the plausible that the problem is caused by this.

Regards

Rasmus

sjo
Associate II
Posted on May 17, 2011 at 12:52

Halting the timers through DBGMCU_CR does work in Keil.

Use the provided STM32DBG.ini

Cheers

sjo