MPC5645S Blinky code please

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC5645S Blinky code please

跳至解决方案
2,483 次查看
peteradamcik
Contributor III

Hi Guys, does anyone have any Assembler or C code to blink a LED on an output port for the MPC5645S?

Please let me know.

Thanks guys

Pete

 

0 项奖励
回复
1 解答
2,451 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hello,

here is LED blinking code

For LED conf:

 

  /*  Toggling Red LED D6 on EVB to observe MCU reset event */

  SIU.GPDO[121].R = 0;             /* MPC56x4xS EVB LED: data output: LED on */

  SIU.PCR[121].R = 0x0200;         /* MPC56x4xS/S EVB LED: enable PK[0] as output */

 

  /*  Toggling LED D7 on EVB to observe MCU wakeup event */

  SIU.GPDO[70].R = 0;             /* MPC56x4xS EVB LED: data output: LED on */

  SIU.PCR[70].R = 0x0200;         /* MPC56x4xS/S EVB LED: enable PF[0] as output */

                                                                                                                       

 

Best regards,

Peter

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,452 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hello,

here is LED blinking code

For LED conf:

 

  /*  Toggling Red LED D6 on EVB to observe MCU reset event */

  SIU.GPDO[121].R = 0;             /* MPC56x4xS EVB LED: data output: LED on */

  SIU.PCR[121].R = 0x0200;         /* MPC56x4xS/S EVB LED: enable PK[0] as output */

 

  /*  Toggling LED D7 on EVB to observe MCU wakeup event */

  SIU.GPDO[70].R = 0;             /* MPC56x4xS EVB LED: data output: LED on */

  SIU.PCR[70].R = 0x0200;         /* MPC56x4xS/S EVB LED: enable PF[0] as output */

                                                                                                                       

 

Best regards,

Peter

0 项奖励
回复
2,469 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I have some codes for HVAC or OPEN_VG but those are complex sample codes.

I have asked application team if there is something available. As I do not have the development board here I cant test the code.

However I can write it in case apps dont have one , but not test it here.

Best regards,

Peter

0 项奖励
回复
2,467 次查看
peteradamcik
Contributor III

Hi Peter, yes can you please write some code in assembler or C, that would be very much appreciated.

Just need to set the a port to output and blink a LED via a delay.

Would it be possible for you to write it in Assembler? I'm not to good with C.

Thanks Pete

Peter

 

0 项奖励
回复