How to synchronize PWM phases on two different SAM3XE boards

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

Posts: 1
Joined: Sun Nov 02, 2014 11:39 pm

How to synchronize PWM phases on two different SAM3XE boards

Mon Nov 03, 2014 12:02 am


I need to synchronize PWM signals on two independent (unconnected) SAM3XE (Arduino Due) boards. Basically I need both of them to generate the same PWM signal (period, duty cycle and phase). 

Because chips are driven by different clocks (having not exactly the same frequency), I need to periodically "re-synchronize" the signal on one of the boards to match the other board. To do so I need to "reset" the PWM signal (to trigger PWM_ISR event not on time) . I tried to reset PWM_CCNT register, without any visible success, but I am not sure this is the correct way to do it. 

The whole technique:
To accomplish the synchronization, I use one board to sends periodical synchronization beacon over RF (with PWM counter) and the second board needs to reset it's counter according to the counter of first board. (I correct the period differences using similar technique). I did succeeded to enable this technique on AVR chips, but not on SAM3.

Any suggestions would be more than welcomed,
Meir Tseitlin

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 10 guests