This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I'm very new to programming on the TMS320F28379D, and I am in a situation where I would like to utilize the high-resolution phase shift control mentioned in the technical reference. The reference says to use TRREM instead of TBPHSHR for high-resolution phase shift, and this is shown in the C2000Ware deadband example, but I experimented with the TRREM register in the example and my own program, (commenting it out, sweeping values) and I can't see it making any difference. Is the change too fine to view on an Oscilloscope, because the rising edge of the PWM does not seem to move at all, regardless of the TRREM value? I tried TBPHSHR out of curiosity and saw the same absence of motion despite sweeping the value in a loop. I think my understanding of the TRREM and TBPHSHR registers is lacking, as I do not understand what difference is made in the deadband example, despite it being the foremost example of TRREM usage. Please let me know anything that could help explain.
Hi Stephen,
The reference says to use TRREM instead of TBPHSHR for high-resolution phase shift, and this is shown in the C2000Ware deadband example, but I experimented with the TRREM register in the example and my own program, (commenting it out, sweeping values) and I can't see it making any difference
When you mention commenting it out you mean just commenting out the line that updates the TRREM register? If you check the register in the expression window do you still see it updating?
Best Regards,
Marlyn
Hi Marlyn,
Exactly, I commented out the line that assigns a value to the TRREM register and saw no difference in the phase shift between the PWM signals on the oscilloscope. TRREM continued to be updated to various values without the line assigning it. I assume this is because the example is configured in HRPWM mode; the technical reference also states that HRPWM updates precede the CPU write in priority, if that is related.
Commenting out the assignment of the TBPHS register as well as TRREM removes the updating of the phase shift altogether, such that it remains constant. Commenting out ONLY the TBPHS register had the same effect as commenting out both.
Best,
Stephen
I revisited the example today, commented out the change in duty cycle, period, and non-high-resolution phase shift. Then I added a sweep to the TRREM register and I was able to observe the fine change in phase shift that I was hoping for. I'm not exactly sure what I did wrong initially that caused me not to see anything. My probes were initially filtering >5MHz noise, which made the phase harder to discern, but I must've been missing something else because it's still visible when I re-enable the probes' filter. I'll try to get it working in my own program now, Thanks for replying!