Question
STM32 UART/USART RX message terminator detection with LIN Mode
Posted on September 01, 2015 at 09:32
Hi everybody,
I am using several flavours of STM32: STM32F407, STM32F030, STM32F071, STM32F303 (soon). Concerning UART, I want to set up a protocol using variable-length messages. In order to minimize the CPU overhead, I want to use the TX with DMA and interrupt at the end of the transmitted message, and RX with DMA and interrupt at the end of the received message.- On the TX side I can fire an IRQ with TXE or TC status bits, that's fine.
- On the RX side I want to fire an IRQ at the end of the received message. Since the protocol uses variable-length messages, how can the RX tell the received message has ended?
- RTOF (RX timeout)
- CMF (Character match)
- I don't like using IDLE because it would fire and IRQ as soon as the TX leaves the line idle for just 1 char, no mercy for the TX being a little busy sometimes...
LIN mode
, can you give me some advice? Q1: On the TX side, is there any difference with UART mode @ 8-bit data length? Q2: On the RX side, apart from the Break character handling, is there any difference with UART mode @ 8-bit data length? Q3: Any other caveats or constraints with LIN mode? Best regards, Mauro #stm32-uart-lin-break Note: this post was migrated and contained many threaded conversations, some content may be missing.