S32K3 GPIO HIGH-Z

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

S32K3 GPIO HIGH-Z

Jump to solution
2,408 Views
Chenxu1
Contributor II

Hi,NXP experts
In S32DS3.5, how do I configure pin to state HIGH-Z?   S32K312+RTD4.0.0
In picture 1 it says can be configured as HIGH-Z,but I can't find the configuration item.

Chenxu1_0-1733391241328.png

Chenxu1_1-1733391247913.png

It is configurable in EB(picture 3).

Chenxu1_2-1733391410995.png

 



 

0 Kudos
Reply
1 Solution
2,375 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Chenxu1 

Unlike EB Tresos, S32 ConfigTools does not have the option to set the PortPin Direction to PORT_PIN_HIGH_Z, as this is the default value. If you want to change it, you can use the functions Siul2_Port_Ip_SetPinDirection() or Port_SetPinDirection().

 

BR, VaneB

View solution in original post

0 Kudos
Reply
2 Replies
1,928 Views
ASN7
Contributor III

For anyone looking on using Siul2_Port_Ip_SetPinDirection to set to Hi-Z, here is how to call the function:

Siul2_Port_Ip_SetPinDirection(PORT, PIN, SIUL2_PORT_HI_Z);


For input variable 1 of the function, which is `Siul2_Port_Ip_PortType * const base`, you need to use the defines mentioned in `Siul2_Port_Ip_Defines.h` and not the ones `Siul2_Port_Ip_Cfg.h`. You can find out what define the Pin you are using belongs to by checking in  `Siul2_Port_Ip_Cfg.h` as shown below:

ASN71_0-1744013239920.png

Now that PTD_H_HALF is known, which is Port D High Half Base, find it in `Siul2_Port_Ip_Defines.h` and use it as the first input argument. 



For input variable 2, you can use the defines mentioned in  `Siul2_Port_Ip_Cfg.h` which is nothing but the Pin Number. 

Once the pin is set to SIUL2_PORT_HI_Z, you do not have to use Siul2_Dio_Ip_WritePin function as it is only used to set the Pin to High or Low and not for SIUL2_PORT_HI_Z.  

 I hope this gives a bit more clarity. 

0 Kudos
Reply
2,376 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Chenxu1 

Unlike EB Tresos, S32 ConfigTools does not have the option to set the PortPin Direction to PORT_PIN_HIGH_Z, as this is the default value. If you want to change it, you can use the functions Siul2_Port_Ip_SetPinDirection() or Port_SetPinDirection().

 

BR, VaneB

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2008049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K3%20GPIO%20HIGH-Z%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2008049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%EF%BC%8CNXP%20experts%3CBR%20%2F%3EIn%20S32DS3.5%2C%20how%20do%20I%20configure%20pin%20to%20state%20HIGH-Z%3F%26nbsp%3B%20%26nbsp%3BS32K312%2BRTD4.0.0%3CBR%20%2F%3EIn%20picture%201%20it%20says%20can%20be%20configured%20as%20HIGH-Z%EF%BC%8Cbut%26nbsp%3BI%20can't%20find%20the%20configuration%20item.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chenxu1_0-1733391241328.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chenxu1_0-1733391241328.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F314295i414357A6A1C4507A%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chenxu1_0-1733391241328.png%22%20alt%3D%22Chenxu1_0-1733391241328.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chenxu1_1-1733391247913.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chenxu1_1-1733391247913.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F314296iB718F0C4F2BF23F4%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chenxu1_1-1733391247913.png%22%20alt%3D%22Chenxu1_1-1733391247913.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIt%20is%20configurable%20in%20EB%EF%BC%88picture%203%EF%BC%89.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chenxu1_2-1733391410995.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Chenxu1_2-1733391410995.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F314299iC4C8F7988CCE2040%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Chenxu1_2-1733391410995.png%22%20alt%3D%22Chenxu1_2-1733391410995.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2075153%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K3%20GPIO%20HIGH-Z%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2075153%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EFor%20anyone%20looking%20on%20using%26nbsp%3B%3CSPAN%3ESiul2_Port_Ip_SetPinDirection%20to%20set%20to%20Hi-Z%2C%20here%20is%20how%20to%20call%20the%20function%3A%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3ESiul2_Port_Ip_SetPinDirection(PORT%2C%20PIN%2C%20SIUL2_PORT_HI_Z)%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3EFor%20input%20variable%201%20of%20the%20function%2C%20which%20is%20%60Siul2_Port_Ip_PortType%20*%20const%20base%60%2C%20you%20need%20to%20use%20the%20defines%20mentioned%20in%20%60Siul2_Port_Ip_Defines.h%60%20and%20not%20the%20ones%20%60Siul2_Port_Ip_Cfg.h%60.%20You%20can%20find%20out%20what%20define%20the%20Pin%20you%20are%20using%20belongs%20to%20by%20checking%20in%26nbsp%3B%26nbsp%3B%60Siul2_Port_Ip_Cfg.h%60%20as%20shown%20below%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ASN71_0-1744013239920.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ASN71_0-1744013239920.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F331578iFABC73EC70034F83%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ASN71_0-1744013239920.png%22%20alt%3D%22ASN71_0-1744013239920.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ENow%20that%20PTD_H_HALF%20is%20known%2C%20which%20is%20Port%20D%20High%20Half%20Base%2C%20find%20it%20in%20%60Siul2_Port_Ip_Defines.h%60%20and%20use%20it%20as%20the%20first%20input%20argument.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3EFor%20input%20variable%202%2C%20you%20can%20use%20the%20defines%20mentioned%20in%26nbsp%3B%20%60Siul2_Port_Ip_Cfg.h%60%20which%20is%20nothing%20but%20the%20Pin%20Number.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EOnce%20the%20pin%20is%20set%20to%20%3CSPAN%3ESIUL2_PORT_HI_Z%2C%20you%20do%20not%20have%20to%20use%26nbsp%3BSiul2_Dio_Ip_WritePin%20function%20as%20it%20is%20only%20used%20to%20set%20the%20Pin%20to%20High%20or%20Low%20and%20not%20for%20SIUL2_PORT_HI_Z.%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%26nbsp%3BI%20hope%20this%20gives%20a%20bit%20more%20clarity.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2008564%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K3%20GPIO%20HIGH-Z%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2008564%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F230296%22%20target%3D%22_blank%22%3E%40Chenxu1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUnlike%20EB%20Tresos%2C%20S32%20ConfigTools%20does%20not%20have%20the%20option%20to%20set%20the%20PortPin%20Direction%20to%20PORT_PIN_HIGH_Z%2C%20as%20this%20is%20the%20default%20value.%20If%20you%20want%20to%20change%20it%2C%20you%20can%20use%20the%20functions%20Siul2_Port_Ip_SetPinDirection()%20or%20Port_SetPinDirection().%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%2C%20VaneB%3C%2FP%3E%3C%2FLINGO-BODY%3E