How to make gpio pin as High and Low

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to make gpio pin as High and Low

跳至解决方案
686 次查看
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 项奖励
1 解答
651 次查看
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!

在原帖中查看解决方案

4 回复数
659 次查看
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 项奖励
655 次查看
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 项奖励
652 次查看
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!

645 次查看
sarwath
Contributor IV

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

0 项奖励