LED on/off

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,434件の閲覧回数
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 件の賞賛
返信
1 解決策
1,417件の閲覧回数
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 件の賞賛
返信
1 返信
1,418件の閲覧回数
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 件の賞賛
返信