Skip to main content
ronnelrtolentino
Associate
September 9, 2014
Question

STM32CubeF4 LIN driver support

  • September 9, 2014
  • 3 replies
  • 1570 views
Posted on September 09, 2014 at 04:06

Hi!

I am creating a project using STM32F4.

The project should support LIN communication through UART4.

I have the base code created using STM32CubeF4.

I am using the provided HAL UART driver but the functions and it's documentation aren't clear.

Does anyone here has a working code for LIN in STM32F4?

♯ Any LIN transceiver module can do, I just need to know how to integrate it (initialize, handle the in/out buffers, etc) with the base code that I have.

#stm32cubef4-lin-uart-hart-driver
This topic has been closed for replies.

3 replies

Montassar BEN ROMDHANE_O
Visitor II
September 12, 2014
Posted on September 12, 2014 at 15:09

Hi tolentino.ronnel,

You can find below the LIN/UART available APIs within the STM32Cube FW:

  • LinLIN Initialization: HAL_LIN_Init()
  • LIN De-Initialization: HAL_UART_DeInit()
  • LIN Data processing: same UART API used for Data transfers (HAL_UART_Transmit(),HAL_UART_Receive(),…)
  • LIN control:  HAL_LIN_SendBreak()

Concerning the LIN transceiver module, there no solution available now. We’ll let our team know about your suggestion.

Regards.

ronnelrtolentino
Associate
September 15, 2014
Posted on September 15, 2014 at 04:19

Hi Heisenberg,

Thank you.

Can you provide a sample code?

Or at least the code flow for polling, dma and interrupt modes using these APIs?

Regards.

in mozbek we trust
Associate III
August 9, 2018

Hello ,

I also working with LIN communications. I use TJA1021T/10/C LIN transreceiver. I can send break message and see the consecutive break signals in oscilloscope. I use PEAK PCAN USB Pro FD API to see LIN messages but i cant see the break messages in that API. (By the way i cant send any LIN messages.)

In my MCU datasheet(STM32F091CCT6) says LIN transmit is same as normal UART transmit and that sentence i understand the i can use HAL_UART_TRANSMIT function but after i init the code with example data HAL_UART_Transmit(&huart1, 0x20BBCCDDEEFFDD11, 8, 10); i cant see any signals or message in oscilloscope and PLIN API

Did you use similiar things ? We can share our experiences to each other.