setting a pin as high

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

setting a pin as high

467 Views
turkmani_11
Contributor III

can anyone explain how to set a pin as high, i want to set PA1 as high on my MPC5748G , and set PG8 , PG7 and PG9 as low .

I did the following after configurating them as outputs from SIU2 GPIO,

PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);

PINS_DRV_WritePin(PTA, 1u, 1);
PINS_DRV_WritePin(PTG, 7u, 0);
PINS_DRV_WritePin(PTG, 8u, 0);
PINS_DRV_WritePin(PTG, 9u, 0);

how can i know that the are set?

 

 

0 Kudos
Reply
1 Reply

446 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Since I am not familiar with your drivers used, I will explain it on micro level.

can anyone explain how to set a pin as high, i want to set PA1 as high on my MPC5748G , and set PG8 , PG7 and PG9 as low

Find corresponding MSCR to pin you need to set in IO table attached to reference manual.

You need to setup MSCR rigister filed SRC and OBE.

SRC to 11b or 0x3h

OBE to 1

petervlna_0-1664436634564.png

 

how can i know that the are set?

You can use simple measurement tools like multimeter, voltmeter or scope and measure the physical pin to see its level.

Best regards,

Peter

 

0 Kudos
Reply