2019-10-01 03:53 PM
Hi,
I'm developing a PCB which uses the STM32H750VBT's timers TIM2 - 5 to drive a bunch of LEDs for a user interface. I've verified that the timers are all outputting their data correctly. The start of TIM2, 3, and 5 are all triggered by the start of TIM4, they are in "slave mode", however, this shouldn't affect my problem.
When I am using GDB to debug this microcontroller over SWD and I press ctrl+c to halt the MCU, I want the timer outputs to be "disabled" as described in section 38.3.21 of the datasheet. I'm setting the bits corresponding to TIM2, 3, 4, and 5 in the DBGMCU_APB1FZ2 register. (Note, I think there's a typo in the datasheet here. There's no DBGMCU_APB1FZ2 register, instead, it seems like DBGMCU_APB1LFZ1 is the right one.)
Because I've set the bits in the DBGMCU_APB1LFZ1 register, the timers DO stop when I'm in debug mode. If I clear the bits, the timers keep running in debug mode. The only problem: the timer outputs remain driven high or low, depending on the state the PWM was in when the CPU was halted.
I did check to see if the word "disabled" in 38.3.21 actually means "high-z", but it looks like the pins are actively driven.
Is there undocumented silicon errata for STM32H750VBT rev. Y, or am I missing something obvious? I bet it's number 2.
2019-10-02 04:01 AM
Can you try with TIM1/TIM8?
IMO that claim, that outputs are disabled while debugging, in non-advanced timers' chapters may be one of the numerious garbage resulting from copy/paste in the manuals.
Note that even the wording in the Debug mode subchapter for TIM1/TIM8 is garbage.
JW
2019-10-03 02:40 PM
Thanks for the help, Jan.
I haven't had the chance yet today to try this experiment, but I'll post results soon.
>Note that even the wording in the Debug mode subchapter for TIM1/TIM8 is garbage.
Not the first time I've been unhappy with STM's datasheet wording. I wasted months trying to get a high-speed USB module to work, but I ended up moving to a different job before it panned out. I think the project was scrapped.
Also, the timer chapters in this datasheet are only a little clearer than mud.