cancel
Showing results for 
Search instead for 
Did you mean: 

TIM1 software break

Paolo Chiantore
Associate II
Posted on February 23, 2017 at 17:17

On a STM32 F767 I'm using TIM1 for PWM generation on CH1 to 3 and CH1N to CH3N.

I have enabled Break2 (TIM1_BDTR.BK2E=1) and disabled Break (TIM1_BDTR.BKE=0).

When I trigger a Break event via software (by setting TIM1_EGR.BG=1) I expect no effect on PWM generation, since Break is disabled. Instead TIM1 PWM CH1 commutation is stopped, PWM CH1 output is set to the value set in TIM1_CR2.OIS1 and TIM1_SR.BIF flag is set Exactly as if Break event were enabled.

The point here is I don't understand how a software break request (BG) can be propagated even if break is disabled (BKE=0) (see RM0410 Fig 220 attached).

These are the values of the registers after software break;

 -TIM1_BDTR = 0x3002CAC

 -TIM1_SR = 0x0003009F

Any hint appreciated.

0 REPLIES 0