How to make gpio pin as High and Low

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to make gpio pin as High and Low

ソリューションへジャンプ
878件の閲覧回数
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 解決策
843件の閲覧回数
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 返答(返信)
851件の閲覧回数
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 件の賞賛
847件の閲覧回数
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 件の賞賛
844件の閲覧回数
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!

837件の閲覧回数
sarwath
Contributor IV

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

0 件の賞賛