cancel
Showing results for 
Search instead for 
Did you mean: 

STM8 Current Limit using TIM1_ETR

richb
Associate II
Posted on November 20, 2012 at 17:57

Does anyone know of a way to tell if the TIM1_ETR input has shortened the PWM signal being generated on TIM1 (assuming CCMR bit 7 is set)?

Thanks in advance

#bldc-motor-control
1 REPLY 1
Gigi
Senior
Posted on November 21, 2012 at 09:38

Ciao Richard

Reading the reference manual I see that is possible to enable the interrupt on TRGI (TIM1_IER bit TIE), so if you set the input trigger (TRGI = ERTF) in the TIM1_SMCR, then you can have an interrupt when the ETR acts on the PWM signals.

Let me know if it works

Ciao

Gigi