AnsweredAssumed Answered

MPC5645S PWM

Question asked by Anton Karzanov on Nov 9, 2017
Latest reply on Nov 9, 2017 by Anton Karzanov

Hello.

Help me please.

Where can I see examples of the source code for setting the static PWM? (PER - const, duty - const)

I tried to configure this module, but they were unsuccessful. The clock modules, timers and GPIO work fine.

Help me please.

 

/* Fsys = 64 MHz. */

/* init_PWM */

SMC.CTL0.B.DITH = 0;
SMC.CTL0.B.MCPRE = 0x3;
SMC.CTL1.B.MCTOIE = 1;
SMC.CC[2].B.MCOM = SMC.CC[3].B.MCOM = 0x3;
SMC.CC[2].B.CD = SMC.CC[3].B.CD = 00;
SMC.CC[2].B.MCAM = SMC.CC[3].B.MCAM = 0x1;
SMC.PER.B.PER = 100;
SMC.DC[2].B.DUTY = SMC.DC[3].B.DUTY = 50;

Outcomes