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.
It is configurable in EB(picture 3).
解決済! 解決策の投稿を見る。
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
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:
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.
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