MSPM0L1306: Issue with LIN demo code lin_responder (tx&rx abnormal accidental when LIN master restart or slave repower)

Part Number: MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hello

I run demo code lin_responder with MSPM0L1306 LaunchPad Development Kit. The LIN master is Vector VN1630.

There are little change with demo code, see below pictures. 

The TX and RX is abnormal and can not recover when enter else condition after DL_UART_EXTEND_IIDX_RX interrupt.

It happens accidental when LIN master start stop periodic with LIN slave keep power on, or happens accidental when LIN slave power on off periodic with LIN master keep work.

Why received SYNC byte is not 0x55? What function can be invoked to restart LIN, I try to use DL_UART_Extend_reset() but no change.

  • Hi Bian,
    Why are you setting all of your PID as zero when you calculate your checksum? I think this will mess with your LIN communication since the checksum should include the PID into its calculation. As in the else condition you mentioned, it seems the state the original example had is StateMachine = LIN_STATE_WAIT_FOR_BREAK; rather than LIN_STATE_BREAK_FIELD. I recommend putting the original state from the example and see if it fixes the issue. I also recommend leaving the gAutoBaudUsed option in there since it can sometimes help avoid this kinds of wrong functionality. You can use DL_UART_Extend_reset() or toggle the power of the module, but you'll need to re-configure the UART LIN module.

    Best Regards,

    Diego Abad

  • Hi Diego,

    thanks for your info.

    The PID 0x3C and 0x3D are classic checksum.

    The variable StateMachine has been set as original state LIN_STATE_WAIT_FOR_BREAK, but the issue is also.

    Where is gAutoBaudUsed option? i does not find auto buad in TRM? Does MSPM0L1306 support auto buad?

    What function must be invoked for reset LIN? I use SYSCFG_DL_LIN_0_init(), but it does not work.

    I find the time of sync is invalid when issue happen, enter else condition in below picture.

    thank!

    johnny

     

  • Hi Bian,
    The auto baud rate is an option handled through a process inside the code that most of our examples have by default. Here's a link to the code you can copy for this device. 

    You will use the reset function or the turn off/turn on functions to reset the UART-LIN Module. However, once you do this, you'll need to reconfigure it. You can find those functions inside the ti_dl_sysconfig.c file. 

    Best Regards,

    Diego Abad