STM32L4 serial: Allow configuring Rx DMA buffer size
This commit is contained in:
parent
249ab6eb18
commit
fc2deb118c
@ -3414,6 +3414,18 @@ config UART5_RXDMA
|
|||||||
---help---
|
---help---
|
||||||
In high data rate usage, Rx DMA may eliminate Rx overrun errors
|
In high data rate usage, Rx DMA may eliminate Rx overrun errors
|
||||||
|
|
||||||
|
config STM32L4_SERIAL_RXDMA_BUFFER_SIZE
|
||||||
|
int "Rx DMA buffer size"
|
||||||
|
default 32
|
||||||
|
depends on USART1_RXDMA || USART2_RXDMA || USART3_RXDMA || UART4_RXDMA || UART5_RXDMA
|
||||||
|
---help---
|
||||||
|
The DMA buffer size when using RX DMA to emulate a FIFO.
|
||||||
|
|
||||||
|
When streaming data, the generic serial layer will be called
|
||||||
|
every time the FIFO receives half this number of bytes.
|
||||||
|
|
||||||
|
Value given here will be rounded up to next multiple of 32 bytes.
|
||||||
|
|
||||||
config SERIAL_DISABLE_REORDERING
|
config SERIAL_DISABLE_REORDERING
|
||||||
bool "Disable reordering of ttySx devices."
|
bool "Disable reordering of ttySx devices."
|
||||||
depends on STM32L4_USART1 || STM32L4_USART2 || STM32L4_USART3 || STM32L4_UART4 || STM32L4_UART5
|
depends on STM32L4_USART1 || STM32L4_USART2 || STM32L4_USART3 || STM32L4_UART4 || STM32L4_UART5
|
||||||
|
@ -133,9 +133,18 @@
|
|||||||
*
|
*
|
||||||
* When streaming data, the generic serial layer will be called
|
* When streaming data, the generic serial layer will be called
|
||||||
* every time the FIFO receives half this number of bytes.
|
* every time the FIFO receives half this number of bytes.
|
||||||
|
*
|
||||||
|
* If there ever is a STM32L4 with D-cache, the buffer size
|
||||||
|
* should be an even multiple of ARMV7M_DCACHE_LINESIZE, so that it
|
||||||
|
* can be individually invalidated.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# define RXDMA_BUFFER_SIZE 32
|
# if !defined(CONFIG_STM32L4_SERIAL_RXDMA_BUFFER_SIZE) || \
|
||||||
|
CONFIG_STM32L4_SERIAL_RXDMA_BUFFER_SIZE == 0
|
||||||
|
# define RXDMA_BUFFER_SIZE 32
|
||||||
|
# else
|
||||||
|
# define RXDMA_BUFFER_SIZE ((CONFIG_STM32L4_SERIAL_RXDMA_BUFFER_SIZE + 31) & ~31)
|
||||||
|
# endif
|
||||||
|
|
||||||
/* DMA priority */
|
/* DMA priority */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user