MPC5645S PWM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5645S PWM

1,392 Views
antonkarzanov
Contributor II

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;

Labels (1)
Tags (2)
4 Replies

1,196 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

we have posted all available example here:

https://community.nxp.com/docs/DOC-329623 

Peter

1,196 Views
antonkarzanov
Contributor II

Thanks for the answer.
Which device is closest to the MPC5645S from this list?

Anton.

0 Kudos
Reply

1,196 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

The closest micro is MPC5606S.

But the modules are mostly general trough all MPC microcontrollers.

Unfortunately SMC is not general module and it is implemented only on MPC5606S and MPC5645S.

Peter

1,196 Views
antonkarzanov
Contributor II

Ok. Thanks.

0 Kudos
Reply