Hi there
I'm working on a port of our BTstack Bluetooth Host stack for ChibiOS. BTstack's transport layer requests data from the UART in blocks and uses CTS/RTS to avoid loosing bytes. The trunk ChibiOS/HAL implementation in uart_enter_rx_idle_loop() unconditionally restarts the UART DMA leading to a loss of bytes.
I'd like to propose to change the behaviour of uart_enter_rx_idle_loop() for the case when RTS is enabled and there's no byte callback registered.
The attached patch changes this to restart DMA only if a) RTS is not active, or, b) a single byte callback is defined. With the patch, DMA is not restarted and no byte gets lost with RTS. Tested on an F4 Discovery board.
Best regards
Matthias
Improve DMA UART with RTS/CTS on STM32
Improve DMA UART with RTS/CTS on STM32
- Attachments
-
- stm32-uart-rts.patch.zip
- (779 Bytes) Downloaded 126 times
- Giovanni
- Site Admin
- Posts: 14461
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Improve DMA UART with RTS/CTS on STM32
Fixed patch to match description. Sorry.
- Attachments
-
- stm32-uart-rts.patch.zip
- (783 Bytes) Downloaded 128 times
Return to “Small Change Requests”
Who is online
Users browsing this forum: No registered users and 6 guests