2014-04-01 12:42 PM
LIN mode not very well documented by STM as I realize. And
does not have
as many
features
, as I hoped. Anyway, it works quite ok in my STM32F407 project. But on STM32F303 there is a problem - LIN brake signal is only 10 bit wide. Datasheet says it must be 13 bit. No information about this in erratasheet. Found here couple of LIN related discussion started, but without any answer, hope this discussion will be different:) #stm32 #lin #usart2014-09-04 10:21 PM
Hi AlexSmart - you mentioned that you got LIN working in .STM32F407, so I wanna ask a few questions:
2014-09-09 10:46 AM
HiAlexSmart,
Please note that the LIN modeshould be activated before enabling USART and not all USARTs support this feature, as described within the reference manual:The LIN mode enables the capability to send LIN Synch Breaks (13 low bits) using the SBKRQ bit in the USARTx_RQR register, and to detect LIN Sync breaks.
This bit field can only be written when the USART is disabled (UE=0).
Thus, you can find below the approriate function calls, to check LIN mode, using the StdPeriphLib:
/* USART configuration */
USART_Init();
USART_LINBreakDetectLengthConfig();
USART_LINCmd();
/* Enable USART */
USART_Cmd();
USART_RequestCmd(EVAL_COM1, USART_Request_SBKRQ, ENABLE);
With regards.