2024-07-09 10:55 PM
Hi,
i was trying to change dead time from (244 value to 100) for every 10ms in a loop. But its not updating , the set dead time is 244 in the PWM waveform.
Though my dead band register ( DTG) is updating at every 10ms.
I am updating TIM1->DTR2
if(end_tick_ms <= uwTick)
{
if(no_of_times <4)
{
no_of_times += 1;
current_tick_ms = uwTick;
end_tick_ms = current_tick_ms + 10;
TIM1->DTR2 = i;
i *=0.8f;
if(no_of_times == 4)
{
db_adjust = 1;
}
}
if(db_adjust == 1)
{
db_adjust = 0;
/***set new dead band value for 2.4usec*******/
TIM1->DTR2 = 100;
}
2024-11-28 08:41 AM
Hello @Sushmita, you probably solved this issue and got ahead in your project, could you share with us what was the issue?
I would say that it was mandatory to enable the deadtime preload bit in TIMx_DTR2 register to enable the deadtime value preload?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.