How to config a port pin as Hi-Z in S32DS

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

How to config a port pin as Hi-Z in S32DS

Jump to solution
578 Views
jetty_1012
Contributor II

Hello,

How can I configure a port pin as Hi-Z state in S32DS?

I'd appreciate it if you could show me an example.

jetty_1012_0-1695040360720.png

Thanks.

0 Kudos
1 Solution
464 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Jetty,

The Configuration tool does not allow to dissable the buffers.

Even the No init sets the buffers as per the initial direction configured there.

danielmartynek_0-1695198108836.png

But the pins can be configured for SIUL2 (which is the default muxing) and set them to inputs since the GPIO inputs have high impedance.

After the initialization, the pins can be set to Hi-Z using the Siul2_Port_Ip_SetPinDirection() if you want to have the input buffer disabled too.

danielmartynek_1-1695198370183.png

danielmartynek_2-1695198404525.png

Let me open a discussion with the RTD team to add this option to the Configuration tool.

 

Best regards,

Daniel

 

View solution in original post

0 Kudos
3 Replies
565 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @jetty_1012,

You didn't specify the MCU series, I assume it is S32K3xx.

The default state of the pins out of reset is Hi-Z, there is no need to initialize those pins.

Refer to the IOMUX.xlsx attached to the RM.

There is the reset state of the MSCR registers, MSCR[MUX = OBE = IBE = PUE = 0] which disables the output buffer, input buffer, and pull device.

danielmartynek_0-1695044877172.png

danielmartynek_1-1695045330610.png

 

Regards,

Daniel

 

0 Kudos
552 Views
jetty_1012
Contributor II

Hi @danielmartynek 

Thanks for you reply. And yes, I'm using S32K312.

My problem is that I need some pins to stay Hi-Z, and other pins to be initialized as output/input before my task starts running (I'm using FreeRTOS).

And after my task starts running, I want to set directions for the pins staying Hi-Z state just now by using this API Siul2_Port_Ip_SetPinDirection. If I do not initialize them, then I cannot use the API to set their directions later. 

In other word, I do not want those pins to always keep Hi-Z. I only want them to keep Hi-Z at the beginning and I need to configure them as GPO at sometime when my code is running. Any suggestions about it?

 

Best regards,

Jetty

 

0 Kudos
465 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Jetty,

The Configuration tool does not allow to dissable the buffers.

Even the No init sets the buffers as per the initial direction configured there.

danielmartynek_0-1695198108836.png

But the pins can be configured for SIUL2 (which is the default muxing) and set them to inputs since the GPIO inputs have high impedance.

After the initialization, the pins can be set to Hi-Z using the Siul2_Port_Ip_SetPinDirection() if you want to have the input buffer disabled too.

danielmartynek_1-1695198370183.png

danielmartynek_2-1695198404525.png

Let me open a discussion with the RTD team to add this option to the Configuration tool.

 

Best regards,

Daniel

 

0 Kudos