Deadtime saturates at 2.5us

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Sneha24
Level 1
Level 1
25 sign-ins 5 replies posted 5 questions asked

Hello, I wish to insert a deadtime of 3-4us using the Aurix TC375 lite kit v2. The prescalar for deadtime is not being set in the TCTR0.B.T12CLK field (DTC). The DTC always saturates to 0xFF when I check during debug.

I have gone through the IfxCcu6_TimerWithTrigger.c file and saw the __minu functions set the DTC to 255 (0xFF) and the following loop never executes:

for (prescaler = 0; prescaler < 16; prescaler++)
{
freqT12 = freqCC6 / (1U << prescaler);
periodT12 = freqT12 / config->base.frequency;

if ((periodT12 <= 16386.0) && (periodT12 > config->base.minResolution))
{
break;
}
}

 

So I set the register myself to use prescalar of 128 i.e TCTR0.B.T12CLK = 0x7. Yet it saturates at 2.5us.

Kindly help.

0 Likes
1 Solution
gecmar
Employee
Employee
5 solutions authored 10 replies posted 10 sign-ins

Hello @Sneha24,

if you are using 6kHz as mentioned in https://community.infineon.com/t5/AURIX/Unable-to-generate-PWM-of-6kHz-or-below/m-p/456957#M13944 simply add:

pwmHlConf.base.deadtime = 4e-6;

before 

/* Initialize the PwmHl driver */
IfxCcu6_PwmHl_init(&g_driver, &pwmHlConf);

For better understanding of CCU6 PWM generation you might check: 

https://community.infineon.com/t5/Knowledge-Base-Articles/AURIX-MCU-PWM-signal-generation-using-CCU6...

Best regards

Gecmar

 

View solution in original post

0 Likes
2 Replies
gecmar
Employee
Employee
5 solutions authored 10 replies posted 10 sign-ins

Hello @Sneha24,

if you are using 6kHz as mentioned in https://community.infineon.com/t5/AURIX/Unable-to-generate-PWM-of-6kHz-or-below/m-p/456957#M13944 simply add:

pwmHlConf.base.deadtime = 4e-6;

before 

/* Initialize the PwmHl driver */
IfxCcu6_PwmHl_init(&g_driver, &pwmHlConf);

For better understanding of CCU6 PWM generation you might check: 

https://community.infineon.com/t5/Knowledge-Base-Articles/AURIX-MCU-PWM-signal-generation-using-CCU6...

Best regards

Gecmar

 

0 Likes
Sneha24
Level 1
Level 1
25 sign-ins 5 replies posted 5 questions asked

Thank you, I am actually configuring it for 8kHz, however as you suggested it works well for 6kHz

0 Likes