2013-06-19 7:16 AM
Hello,
I am facing a problem with the timers I am using in STM32f100 MCU. I have configured different timers to operate during the execution of the code, but somehow, all the flags related to Capture/compare or Update in the SR are set as soonas I enable the timer. As I read in the datasheet, they are all set in the hardware, and even if I clear them manually in debug mode, they are set again immidiately. My configuration for TIM3, for example, does not need any CC functionality, though i do use it in other timers. But considering that I need TIM3 only for generating a time base, I still dont understand why should the CC flags in SR be set. Below is the snapshot where I enable the TIM3 and the flags are set.2014-01-19 7:16 AM
Hi,
I see the same ''strange'' automatic setting of TIM3->SR to 0x1F even after clearing IT flags.I tried many things but I don't find the solution.Is TIM_OCIdleState involved ?Anyway, I always see those flags rising, locking me into the IRQ Handler.Do you managed fixing it ?2014-01-19 7:59 AM
I'm not sure them being asserted is quite the same as them generating an interrupt, as that is masked by the enable bits.
If you look at them in a debugger, the machine is not running in real-time. Something interrupting a few 100 times a second is not practical for a human to process. If the CPU is constantly in the interrupt routine one should perhaps look at the prescaler/period values, and if they are impractically frequent. Perhaps showing the code that causes the issue would enable a better analysis?