STM32 USART in LIN mode
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-01 12:42 PM
Posted on April 01, 2014 at 21:42
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 #usart
Labels:
- Labels:
-
UART-USART
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-09-04 10:21 PM
Posted on September 05, 2014 at 07:21
Hi AlexSmart - you mentioned that you got LIN working in .STM32F407, so I wanna ask a few questions:
- What is the LIN Transceiver module you used?
- Where did you download the drivers/documentations you need for STM32F407 to make it work?
- Is your connection via USART or UART?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-09-09 10:46 AM
Posted on September 09, 2014 at 19:46
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.
