LED on/off

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

LED on/off

Jump to solution
481 Views
Mustafa123
Contributor I

Good morning ,

please  iam beginner and i use MPC5748g development board for  GPIO to make led PA10 to make it on//off 

I know that this led is active low

i use 

 SIUL2.MSCR[10].B.OBE=1;
 SIUL2.GPDO[10].R=1;    //to make led off

 SIUL2.GPDO[10].R=0    // to make on 

 

but my problem to use masking it does.not working 

  SIUL2.GPDO[2].R|=(1<<23);  // to make it off     it is on the board still on 

(please i don#t understand the concept of byte access and the probelm in the same time in data sheet 

show PDO_4n,PDO_4n+1,PDO_4n+2,PDO_4n+3) what that mean ?

 

and please is there any ready made function for delay

again thank you very much for time and help 

0 Kudos
1 Solution
464 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Pay attention to following example code:

https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5748G-PinToggleStationery-GHS614/ta-p...

For PA10, shift 8 by bits.

SIUL2.GPDO[2].R|=(1<<8);  (32-bit register, shift to the left)

GPDO[0] consist of PA0, PA1, PA2, PA3 (from left)

GPDO[1] consist of PA4, PA5, PA6, PA7

GPDO[2] consist of PA8, PA9, PA10, PA11

 

View solution in original post

0 Kudos
1 Reply
465 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Pay attention to following example code:

https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5748G-PinToggleStationery-GHS614/ta-p...

For PA10, shift 8 by bits.

SIUL2.GPDO[2].R|=(1<<8);  (32-bit register, shift to the left)

GPDO[0] consist of PA0, PA1, PA2, PA3 (from left)

GPDO[1] consist of PA4, PA5, PA6, PA7

GPDO[2] consist of PA8, PA9, PA10, PA11

 

0 Kudos