How to make gpio pin as High and Low

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

How to make gpio pin as High and Low

Jump to solution
1,732 Views
sarwath
Contributor IV

Hello Community,

I want to make one GPIO pin (i,e A17) as High and Low. If one condition is true I am making the A17 as High else the A17 is Low.

I configured the clk for A17 with output direction. I tried the PINS_DRV_WritePin(); to make high and PINS_DRV_ClearPins(); for Low and  I verified the A17 with multi meter , the output is LOW. 

then I tried with the PTA->PSOR |= 1<<17; still the output is Low only it is not changing the state.

can anyone please help me on this. 

sarwath_0-1666007823803.png

sarwath_1-1666007830949.png

 

BR,

Sarwath

 

0 Kudos
Reply
1 Solution
1,697 Views
JRoberto
NXP TechSupport
NXP TechSupport

@sarwath 

The Real Time Drivers (RTD) is a collection of user-friendly drivers designed to make the interaction between developers and the different Muc's IPs more dynamic. Is not required but it helps a lot.

You can review more details in: Real-Time Drivers (RTD) | NXP Semiconductors

And yes, the way you are setting the register is also correct.

Best Regards!

View solution in original post

4 Replies
1,705 Views
JRoberto
NXP TechSupport
NXP TechSupport

 Hello @sarwath 

You might want to review the example called "Dio_Example_S32K144" from the RTD package. 

RTD Download: Real-Time Drivers (RTD) | NXP Semiconductors

Additionally, I believe this topic would be useful to you
HOWTO: Create a Blinking LED example project using... - NXP Community

0 Kudos
Reply
1,701 Views
sarwath
Contributor IV

Hello @JRoberto ,

 

Why that RTD extension is required.

I found the register to make a pin as HIGH and LOW.

PDDR -- Is the pin used for input or output.

PDOR -- If output, set the value on the pin (0 or 1).

I verified the output, it is changing as per my requirement.

sarwath_0-1666159434955.png

 

Can you please tell me the above method is correct or not.

BR,

Sarwath

0 Kudos
Reply
1,698 Views
JRoberto
NXP TechSupport
NXP TechSupport

@sarwath 

The Real Time Drivers (RTD) is a collection of user-friendly drivers designed to make the interaction between developers and the different Muc's IPs more dynamic. Is not required but it helps a lot.

You can review more details in: Real-Time Drivers (RTD) | NXP Semiconductors

And yes, the way you are setting the register is also correct.

Best Regards!

1,691 Views
sarwath
Contributor IV

Thanks for your response @JRoberto. I will dig more about RTC. 

0 Kudos
Reply