2025-02-07 07:16 AM
First time designing for ST microcontrollers, so I thank you for your patience.
I see by the datasheet that USART1 can be used as a LIN bus directly without a LIN bus transceiver, but I can't find any examples of how the hardware is implemented when that's set up. My assumption is that I need a 1kohm pull up to Vcc on the master and a weaker pull up on the slaves, connected to USART1_TX and leaving USART1_RX floating.
Is this accurate? If not, how do I use the LIN bus peripherals on the STM32L5 series?
2025-02-07 08:53 AM - edited 2025-02-07 08:55 AM
No.
LIN bus is typical on cars, 12V signal level. And STM32 is 3v3 cpu - so you always need transceiver chip.
But you can use the uart, set in linbus-mode, to work with transceiver .
2025-02-07 09:18 AM
That doesn't make sense to me. LIN bus transceivers already work with standard UARTs. There's no reason for a special LIN bus setting in the microcontroller if you already have a UART.
The datasheet for the STM32L562xx part says:
So they have the ability to be used as a half-duplex and as LIN master/slave. The question I have is how am I supposed to connect the half-duplex connection? Do I use just the TX line, or just the RX line, or do I short them together?
The question of the level shifter is one I'll have to investigate further, but one of the reasons I chose this chip for my design was because it supported LIN without a separate transceiver.