s32k312 GPIO

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

s32k312 GPIO

2,582 次查看
fengba_360
Contributor III

Hello,

I am currently using the Siul2_Dio_Ip_ReadPin function to read the high and low states of a GPIO input pin. When I apply a 2.9V voltage to the pin, it returns a high state (1). However, when I apply a 1.5V voltage to the pin, it returns a low signal (0). Ideally, I would like the pin to return a high state (1) when the voltage is above 4V and a low state (0) when the voltage is below 1V.

Could you please guide me on whether the GPIO of the S32K312 operates in this manner or if it supports being adjusted to meet my desired behavior? I look forward to your response.

Thank you!

0 项奖励
回复
5 回复数

2,551 次查看
PavelL
NXP Employee
NXP Employee

Hi,

GPIO has threshold levels depended on supply and temperature. Based on S32K3xx Data Sheet Table 25, VIH is min 0.65*VDD, VIL is max 0.35*VDD.

For your requirement VIH = 4V and VIL = 1V, I would suggest to use analog modules like LPCMP (Low Power Comparator) or SAR_ADC. Alternatively, you may use any external workaround.

Best regards,

Pavel

0 项奖励
回复

2,403 次查看
fengba_360
Contributor III

Sorry for the delay in my response. We conducted some practical measurements over the past two days and found that the pin is high when the voltage is above 3.06V and low when it's below 2.25V, which differs from what's stated in the datasheet. Could you please tell me what might be the reason for this? Thank you.

0 项奖励
回复

2,390 次查看
PavelL
NXP Employee
NXP Employee

Hello @fengba_360 ,

Could you share your measurement setup? Value of VDD_HVA/B, what pin have you selected to be measured, what is your source, how do you observed the output, etc.

I would do this measurement with triangle wave generator as the source, with decoupling cap on DUT pin to avoid noise, route output to the another GPIO.

Best regards,

Pavel

0 项奖励
回复

2,376 次查看
fengba_360
Contributor III
hello:I apply a voltage to a pin through a 24V power supply, and then obtain the pin state using the Siul2_Dio_Ip_ReadPin(DSH1_PORT, DSH1_PIN) function.
0 项奖励
回复

2,356 次查看
PavelL
NXP Employee
NXP Employee

Hello @fengba_360 ,

In my opinion, your setup can be improved. Please try to follow my suggestions from my previous post.

Best regards,

Pavel

0 项奖励
回复