LIN Slave code not available for S32K142 EVB which uses the LIN Connector and LIN Transceiver

cancel
Showing results for 
Search instead for 
Did you mean: 

LIN Slave code not available for S32K142 EVB which uses the LIN Connector and LIN Transceiver

410 Views
shubham_c
Contributor I

Hi,

I am working with LIN for the first time and I am trying to test LIN slave configuration using CANoe (CANoe being Master and S32K142 Eval Board being Slave). I checked the SDK code and I realized that the SDK code does not use the LIN Bus connector available on Eval Board. The Eval Board LIN Connector is connected to LPUART0 but the code uses LPUART1.

Can someone please provide me a sample code (preferably without using SDK) with LIN Slave configuration  using LPUART0 (pins PTC2 and PTC3) which I can directly connect to CANoe and test the LIN interface to understand working of LIN.

Thank you.

0 Kudos
1 Reply

395 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

you can refer to "lin_slave_baremetal_s32k142" demo example available within S32Design Studio.
Example shows the usage of the LIN driver in slave mode.
LPUART1 module with C8/C9 pins is used. Those are not connected to the LIN transceiver as you wrote. As per board schematic (rev.D, https://www.nxp.com/webapp/Download?colCode=S32K142EVB-SPF-29701-RD) transceiver is connected to pins B0/B1.

So simple workaround could be connecting below pins
RX ... J4-5 (PTB0) - J5-18 (PTC8)
TX ... J4-7 (PTB1) - J5-16 (PTC9) 
This assumes B0 and B1 will not be used by any function.

Or you can select LPUART0 directly in LIN component and then in PinMux component choose B0/B1 pins for LPUART0 module.



You can also refer to non-SDK example posted on:
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K116-LPUART-LIN-Slave-TXRX-ISR-S32DS-ARM...

 

BR, Petr

0 Kudos