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.

TM4C1294NCPDT: PWM synchronization

Part Number: TM4C1294NCPDT

Hi,

for a project multiple channels are used to output PWM signal in parallel. The various PWM signals are very critical for the function.

The multiple channels should be time synchronized to start at simultaneously and set to an exact phase shift of 90deg. The synchronize function is known.

However currently a separate Assembler thread is used to modify the PWM. This is not preferred since any possible skip/delay will damage the application. 

Before the thread: https://e2e.ti.com/support/microcontrollers/other/f/908/t/879432 was created.

Regards Kevin

TM4C123GH6PGE

  • Further information on this topic:

    At the moment no OS is used. This way timing is easier to handle.

    There are 3 output stages, each have 4 PWM's witha 90 degree shift one to another. Resulting in a total of 12 PWM's. Phase 0 of the three stages must be absolutely synchronous. Which will make all synchronous due to the same phase shift.

    To be more precise, the fear of using Assembler for the implementation is not any possible skip/delay, but that any modification or change to the tiva in future can influence the timing. e.g. by writing a PWM/timer register x amount of clock cycles later. Other changes could happen as well.

    What has been tried already, is to shift the PWM counters 90deg before and then lat them start synchronous. At synchronous start however the counters have been reset to 0. It would require a start without changing the counter register... Can you follow this explanation better? Has something been done wrong?

    Additional info: one stage runs on A and the other two stages A+B. A and B are each 4x 90deg phase shifted. See picture below. The special cases at 0% and 100%, and that B inverted is to A, can be done for all phases by modifying the duty cycle in SW. The problem only remains in synchronizing and phase-shifting.

  • Kevin Den Toom said:
    To be more precise, the fear of using Assembler for the implementation is not any possible skip/delay, but that any modification or change to the tiva in future can influence the timing. e.g. by writing a PWM/timer register x amount of clock cycles later.

    There is no need to be concerned that TI will make changes to the TM4C1294NCPDT device that would affect the execution of the assembly language routine or how it starts the timer. The TM4C1294NCPDT device is mature and we have no plans to change the silicon.

    I assume you are using the 12 PWM outputs of the general purpose timers. I wonder if you could use the "Wait-for-Trigger" mode to initially start timers with a 90 degree phase difference. During that setup, the PWM outputs could be forced to the "disabled" state.