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
Solved! Go to Solution.
Pay attention to following example code:
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
Pay attention to following example code:
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