boards/modalai: FCv1 DMA optimiziation for 2Mbit UART (#20956)

- disable unused SPI3 DMA
- enable USART2 RX/TX, UART5/6 TX, UART4 RX
This commit is contained in:
modaltb 2023-01-18 20:01:57 -08:00 committed by GitHub
parent 9d7c4b8273
commit 05d828642d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -50,7 +50,7 @@
| Channel 8 | I2C3_TX | I2C4_RX | - | - | I2C2_TX | - | I2C4_TX | - |
| Channel 9 | - | SPI2_RX | - | - | - | - | SPI2_TX | - |
| | | | | | | | | |
| Usage | | SPI2_RX | SPI3_RX_2 | UART7_RX | SPI2_TX | SPI3_TX_1 | TIM4_UP | |
| Usage | UART5_RX | SPI2_RX | UART4_RX | UART7_RX | SPI2_TX | USART2_RX |TIM4_UP /USART2_TX| UART5_TX |
| DMA2 | Stream 0 | Stream 1 | Stream 2 | Stream 3 | Stream 4 | Stream 5 | Stream 6 | Stream 7 |
@ -81,11 +81,15 @@
//--------------------------------------------//---------------------------//----------------
// DMAMAP_UART5_RX // DMA1, Stream 0, Channel 4 (TELEM2 RX)
#define DMAMAP_SPI2_RX DMAMAP_SPI2_RX_1 // DMA1, Stream 1, Channel 9 (SPI2 RX)
#define DMAMAP_SPI3_RX DMAMAP_SPI3_RX_2 // DMA1, Stream 2, Channel 0 (SPI3 RX)
// DMAMAP_UART4_RX // DMA1, Stream 2, Channel 4 (EXPANSION RX)
//#define DMAMAP_SPI3_RX DMAMAP_SPI3_RX_2 // DMA1, Stream 2, Channel 0 (SPI3 RX)
// DMAMAP_UART7_RX // DMA1, Stream 3, Channel 5 (TELEM1 RX)
#define DMAMAP_SPI2_TX DMAMAP_SPI2_TX_2 // DMA1, Stream 4, Channel 0 (SPI2 TX)
#define DMAMAP_SPI3_TX DMAMAP_SPI3_TX_1 // DMA1, Stream 5, Channel 0 (SPI3 TX)
//#define DMAMAP_SPI3_TX DMAMAP_SPI3_TX_1 // DMA1, Stream 5, Channel 0 (ESC RX)
// DMAMAP_USART2_RX // DMA1, Stream 5, Channel 4 (SPI3 TX)
// DMAMAP_TIM4_UP // DMA1, Stream 6, Channel 2 (DSHOT)
// DMAMAP_USART2_TX // DMA1, Stream 6, Channel 4 (ESC TX)
// DMAMAP_UART5_TX // DMA1, Stream 7, Channel 4 (TELEM2 TX)
// DMA2 Channel/Stream Selections
//--------------------------------------------//---------------------------//----------------

View File

@ -233,12 +233,14 @@ CONFIG_SYSTEM_NSH=y
CONFIG_TASK_NAME_SIZE=24
CONFIG_UART4_BAUD=57600
CONFIG_UART4_RXBUFSIZE=600
CONFIG_UART4_RXDMA=y
CONFIG_UART4_TXBUFSIZE=1500
CONFIG_UART5_IFLOWCONTROL=y
CONFIG_UART5_OFLOWCONTROL=y
CONFIG_UART5_RXBUFSIZE=600
CONFIG_UART5_RXDMA=y
CONFIG_UART5_TXBUFSIZE=1500
CONFIG_UART5_TXDMA=y
CONFIG_UART7_BAUD=57600
CONFIG_UART7_IFLOWCONTROL=y
CONFIG_UART7_OFLOWCONTROL=y
@ -255,7 +257,9 @@ CONFIG_USART2_BAUD=57600
CONFIG_USART2_IFLOWCONTROL=y
CONFIG_USART2_OFLOWCONTROL=y
CONFIG_USART2_RXBUFSIZE=600
CONFIG_USART2_RXDMA=y
CONFIG_USART2_TXBUFSIZE=3000
CONFIG_USART2_TXDMA=y
CONFIG_USART3_BAUD=57600
CONFIG_USART3_RXBUFSIZE=180
CONFIG_USART3_SERIAL_CONSOLE=y
@ -264,6 +268,7 @@ CONFIG_USART6_BAUD=57600
CONFIG_USART6_RXBUFSIZE=600
CONFIG_USART6_RXDMA=y
CONFIG_USART6_TXBUFSIZE=1500
CONFIG_USART6_TXDMA=y
CONFIG_USBDEV=y
CONFIG_USBDEV_BUSPOWERED=y
CONFIG_USBDEV_MAXPOWER=500