0

I am trying to implement LIN on IMX8QM with UART3 connecting to a LIN transceiver (TJA 1021).

Since the BSP is not supported by NXP, I found a LIN module (sllin) for Linux on Github (https://github.com/lin-bus/linux-lin/wiki). After loading the module to Linux kernel, I mount sllin0 on ttyLP3 and send data which also can be received by its own. Everything seems find and no error shows up.

However, the data I send are corrupt in oscilloscope. And neither Master mode and Slave mode are able to communicate with other devices on the same LIN bus.

Does anyone successfully implement LIN on IMX8QM using slLIN library? Is there any configuration I just missing? like UART config or something else?

Any advice would be appreciated.

  • Why do you assume that your transceiver is operating correctly? "*send data which also can be received by its own*" -- A loopback connection should always work for any baudrate & framing config. So failure to "*communicate with other devices on the same LIN bus*" could indicate a mismatch in line config or a transceiver issue. "*The data I send are corrupt in oscilloscope*" -- That's your vague summary of the result; instead you need to present the raw description/information in case you're misinterpreting what actually happens. **Where in the circuit are all of these hacks & probes made?** – sawdust Jun 29 '23 at 00:37
  • Thanks for reply @sawdust ! It turns out my LIN transceiver has been in sleep mode all the time. Since configuring it pulling high from device tree for leaving sleep mode is not working, I give it an high signal through jump wire which worked well. Now it can stay on normal mode and the data transmission is fine on LIN bus. Although NXP does not support LIN BSP for i.MX8 series, slLIN module is an alternative way for configuring UART data format as LIN. – Lincoln06 Jul 03 '23 at 06:18

0 Answers0