Forum

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
How to sychronize PWM using LDRDY Sync Register
2016 年 06 月 02 日
16:51:34
zerozaber
Moderator
Forum Posts: 52
Member Since:
2015 年 02 月 11 日
Offline

Hi. My project needs to use 6 synchronized PWM channel, which I choose Motion Controller 0 and 1 (3 module each).
I have read MCM datasheet, and found that there is synchronous reloading mechanism by using LDRDY Sync Register.

I tried to synchronize all PWM by...
1. Disable all reloading using LDRDY Sync Register.
2. Reload all PWM using MCPWM_RELOAD_NOW.
3. delay about 100 milliseconds (PWM period is 50 microseconds).
4. Enable all reloading.
However, the pwm still shifted about 1.15 microseconds.

I would like to know how I can synchronize those PWMs.
Thanks.

2016 年 06 月 04 日
11:26:59
Android_Lin
Moderator
Forum Posts: 208
Member Since:
2014 年 04 月 01 日
Offline

Hi, zerozaber,

zerozaber said
1. Disable all reloading using LDRDY Sync Register.
2. Reload all PWM using MCPWM_RELOAD_NOW.
3. delay about 100 milliseconds (PWM period is 50 microseconds).
4. Enable all reloading.

I think the 1.15 microseconds between PWMs may be created by no-synchronously enable PWM, i recommend to call the "mc_EnableMulti" function to enable PWM synchronously and then to diable/enable reloading synchronously.

Add one step before the Step1, and the flow as following:
1. Enable PWMs synchronously.
2. Disable all reloading using LDRDY Sync Register.
3. Reload all PWM using MCPWM_RELOAD_NOW.
4. delay about 100 milliseconds (PWM period is 50 microseconds).
5. Enable all reloading.

then see the result if is improved.

Forum Timezone: Asia/Taipei

Most Users Ever Online: 66

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Dinosaur: 27

leutenecker: 13

mrZagg: 10

lukeross: 8

tomka: 8

smeezekitty: 8

hippy: 8

Ekkehard: 8

UIdahoCIT: 8

blaxxun: 7

Member Stats:

Guest Posters: 0

Members: 1509

Moderators: 14

Admins: 5

Forum Stats:

Groups: 2

Forums: 10

Topics: 238

Posts: 1079

Newest Members: Carol Chou, Kai-Jung Chou, 1789, RegLiu, ameerawwad, asmanko, nekotwingo, ttronic, Davidpag, zaskia12

Moderators: Glaux: 70, uaa: 11, guigra: 17, asian55: 22, Android_Lin: 208, bcarroll: 12, cucubutter: 84, recycled-air: 12, stevemork: 16, zerozaber: 52, pongraczi: 20, George Andrews III: 56, poto: 11, garpastym: 20

Administrators: eveshih: 1, anthony: 31, viky6: 0, roboard: 135, hcl: 0