2018-12-26 12:37 AM
Hi,
I am using STM32F030C8T6 for a BLDC driver. The driver has the short circuit protection. We use TIM1’s break function to realize it.
Now we get some strange waveform: Sometimes, when a break trig occurs, CHx output become low immediately. If it work normally, CHx should remain low until next PWM cycle, but it rise high again for several us(the whole PWM cycle is 66.7us), and then come low again when it receive break trig signal.
Attachments are the test waveform. For waveform1, CH1 is BKIN input signal, CH2 is TIM1_CH1, oscilloscope time is 2.5us/div. We can see TIM1_CH1 become low immediately when a break trig occurs, but rise high again for about 0.3us, and then become low, high, low again. For waveform2, CH1 is the short circuit current, we can see the current rise high again for the abnormal break function.
Besides, i has done other debug test, and found two regulations:
1. it always happens at the first PWM cycle after a com even. After this fist PWM cycle, the break function is working normally.
2. The PWM module seem to be reset when this problem happens. I use TIM1_CH4 to generate a 0.5us PWM plus and found it come out again when TIM1_CH1 rise high. In other words, the reset of PWM module may cause this problem.
My email is: huangjinbo@xzbots.com. I am looking forward to your reply. Thanks very much.