Skip to main content
Explorer II
April 15, 2024
Solved

How can I Analyze LIN Data on car by STM32?

  • April 15, 2024
  • 2 replies
  • 1540 views

I have a sensor which send LIN message to vehicle, I want to read value of current, voltage, etc, form this message by SMT32. I connect LIN Wire to IO of MCU. How can I connect and analyze data?

    This topic has been closed for replies.
    Best answer by ThanhVd

    Thank you for providing the comment. 
    I just started with LIN Communication. Could you please give me the example code for analyzing data sent from LIN wire in the vehicle?
    Thank you

    2 replies

    Super User
    April 15, 2024

    > I connect LIN Wire to IO of MCU.

    I hope you did not ! LIN is 12V signal level, will damage a 3.3V cpu !

    You need to connect  LIN Transceiver, maybe NCV7329, and set the serial interface to LIN mode.

    AScha3_0-1713164232054.png

     

    What speed an protocol is used, you should know from sensor or vehicle data - otherwise you cannot do anything useful.

    ThanhVdAuthorAnswer
    Explorer II
    April 16, 2024

    Thank you for providing the comment. 
    I just started with LIN Communication. Could you please give me the example code for analyzing data sent from LIN wire in the vehicle?
    Thank you

    Super User
    April 16, 2024

    I never did...but see on git ->

    https://github.com/kilohercas/STM32F103_LINBUS

     

    +

    set uart to ->

    AScha3_0-1713284708965.png

     

    ThanhVdAuthor
    Explorer II
    April 17, 2024

    Thank you very much.