Phase shift issue

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

cross mob
Daniel27
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

Hello people, I using microcontroller tc377 Aurix and  I trying to do phase shift but I don't know  how, I create 4 pairs of Pwm with deadtime using GTM module and DTM submodule but for phase shift I don't know how to use. If you have an example code or please tell me  what to use to create these phases shift, I see in submodule DTM  registers for control shift phase but when I try to modify them nothing happens.

I would be very grateful if you could help me !

Thanks in advance!!

0 Likes
1 Solution
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

I assume you need constant phase shift and it is not based on the hardware trigger. One approach for this is to use the trigger within the ATOM to phase shift. The idea is to have one channel as a master and the next channel as a slave such that the counter register CN0 of the slave is reset when the trigger comes from the master channel.
In the GTM simply
• Use ATOMx_CHy to generate an output0 signal which is a simple PWM. Then use DTM to derive the inverted signal. Use ATOM SOMP so CM0 defines the period, CM1 defines the duty cycle
• Use ATOMx_CHy+1 to generate output1 signal. Use ATOMx_CHy TRIG (RST_CCU0=1) to reset CN0 of ATOMx_CHy+1. Now CM0 defines edge to SL and CM1 defines edge to !SL using which the phase shift and duty cycle are adjusted. The details are available in section 28.15.3.3.1 of the UM part 2. The output can be with DTM for dead time generation. This can be further cascaded if needed.

Thanks

View solution in original post

0 Likes
6 Replies
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

The required configurations are available in section 8.16.3 'Phase Shift Control Unit' of the user manual part 2. Please check if these steps are done, you can share your code if you still face the issue.

Thanks.

0 Likes
lock attach
Attachments are accessible only for community members.
Daniel27
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

Hello, I read that chapter, but when I change those registries(RELBLK, SHIFT_SEL ...) nothing happens, I will share you my code in which I generated PWM with deadtime and if you can help me with which lines of code must be added to be able to perform to achieve phase shift I would very happy because I have been waiting for several weeks to solve this problem.

0 Likes
Daniel27
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

@Yuva if you could take a look and help me with a solution, I would be very grateful

 

 

0 Likes
FD_aurix
Level 5
Level 5
100 sign-ins 100 replies posted 5 solutions authored

Please define well what you need to do . Might be the PSU is not what you need.

0 Likes

Hello,  as a project I have to make a dc dc converter and now I am at the step where I have to dephase the pairs of pwms between them, namely the second pair should be out of phase by a maximum period/2 of the first pair of PWMs, the third pair should be out of phase with respect to the second also by a maximum of period/2 as well as in case of the four pair, but I don't want this phase shift to change my period and duty cycle.

0 Likes
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

I assume you need constant phase shift and it is not based on the hardware trigger. One approach for this is to use the trigger within the ATOM to phase shift. The idea is to have one channel as a master and the next channel as a slave such that the counter register CN0 of the slave is reset when the trigger comes from the master channel.
In the GTM simply
• Use ATOMx_CHy to generate an output0 signal which is a simple PWM. Then use DTM to derive the inverted signal. Use ATOM SOMP so CM0 defines the period, CM1 defines the duty cycle
• Use ATOMx_CHy+1 to generate output1 signal. Use ATOMx_CHy TRIG (RST_CCU0=1) to reset CN0 of ATOMx_CHy+1. Now CM0 defines edge to SL and CM1 defines edge to !SL using which the phase shift and duty cycle are adjusted. The details are available in section 28.15.3.3.1 of the UM part 2. The output can be with DTM for dead time generation. This can be further cascaded if needed.

Thanks

0 Likes