Skip to main content
Jerry Yung
Associate III
Aug 6, 2019 7:30 AM UTC
Solved

About Ouput Compare Insert dead time .

Now , I generate below waveform. Every thing is OK except for red arrow , it indicate a deadtime.but it's longer than other deadtime , in fact , This dead time is twice as large as the other dead time .

​

divide into three stage :

1�?First Stage , TIM register content

CCMR1.OC2M = 1 ;

CCMR1.OC1M = 1;

​

CCER.CC1NE = 1;

CCER.CC2NE = 1;

​

CCER.CC1NP = 1;

CCER.CC2NP = 1;

​

BDTR.OSSR = 1;

BDTR.MOE = 1;

​

2�?Second Stage

CCMR1.OC1M = 2;

​

CCER.CC1E = 1;

CCER.CC1NE = 1;

CCER.CC1NP = 1;

​

BDTR.OSSR = 1;

BDTR.MOE = 1;

​

3�?Third Stage

CCMR1.OC2M = 2;

​

CCER.CC2E = 1;

CCER.CC2NE = 1;

CCER.CC2NP = 1;

​

BDTR.OSSR = 1;

BDTR.MOE = 1;

​

when every stage completed , clear all resgister,​ then ,re-config TIM , re-start .

​

0690X00000986RLQAY.png

​

so. I don't know why the second stage dead time have problem .​

This topic has been closed for replies.
Jerry Yung
Jerry YungBest answer
Associate III
Aug 7, 2019 12:44 AM UTC

config CCER before BDTR ​can be solved

3 replies

waclawek.jan
Super User
Aug 6, 2019 7:43 AM UTC

This again as in your previous post, may be an artefact from the way how you set up things. Hard to tell without seeing the actual code, and also I don't have time to analyze this thoroughly.

Try to single-step through the code clearing/setting the timer registers (while having the timer stopped, maybe through the DBGMCU freeze registers) and observe the impact of each register change on the outputs.

JW

Jerry Yung
Associate III
Aug 6, 2019 12:22 PM UTC

yes , I have solved !

thanks for your help all the time .

Jerry Yung
Jerry YungAuthorBest answer
Associate III
Aug 7, 2019 12:44 AM UTC

config CCER before BDTR ​can be solved