[S32K312] Reading from the GPIO pin always returns 1

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

[S32K312] Reading from the GPIO pin always returns 1

Jump to solution
167 Views
Hanz
Contributor II

There is a TCAN nFAULT pin connected to MCU pin PTB3. When the TCAN is operating normally, the nFAULT pin stays HIGH. When a fault is detected, the IC pulls the nFAULT pin LOW.

I measured the voltage on both the IC’s nFAULT pin and MCU PTB3 pin — both show 0V (LOW).
However, when calling Siul2_Dio_Ip_ReadPin(CAN_FAULT_MCU_PORT, CAN_FAULT_MCU_PIN), it always returns 1 (HIGH).

Could this be a GPIO pin configuration issue?

0 Kudos
Reply
1 Solution
119 Views
Hanz
Contributor II


Hi Petrs,

Sorry for the inconvenience. I got the wrong pin number from the hardware schematic. After checking the updated schematic and correcting the pin number, the GPIO value is now correct.

View solution in original post

0 Kudos
Reply
2 Replies
120 Views
Hanz
Contributor II


Hi Petrs,

Sorry for the inconvenience. I got the wrong pin number from the hardware schematic. After checking the updated schematic and correcting the pin number, the GPIO value is now correct.

0 Kudos
Reply
146 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Hanz,

how are CAN_FAULT_MCU_PORT, CAN_FAULT_MCU_PIN defined? What is config in Pins tool?
I can recommend to check within debugger a setting of SIUL2 MSCR35 if there is expected values according Pins tool setting. It would be enough to have IBE set 
(plus pull device if desired).
Then check SIUL2 GPDI35 as well.

BR, Petr

 

0 Kudos
Reply