Skip to content

UART Async API support for STM32 Discovery Board #90108

Answered by ldomaigne
rt-2pm2 asked this question in Q&A
Discussion options

You must be logged in to vote

I don't have the stm32f4_disco available, so I went for a nucleo_f411re instead.
Getting the async UART working for the STM32F4 boards isn't as straightforward as for the Nordic boards.
In particular, you need to configure DMA.
But the UART Async API sample should work fine.

In my case, I used USART1, mapped on PB_6 & PB_7.
USART2 is the default uart, so I needed to change zephyr,shell-uart accordingly.

As you might see with Kconfig search / menuconfig, the UART_ASYNC_API requires DMA to be configured for the STM32 boards.
So, I had to enable the DMA controller (dma2 in my case), and overlay the USART1 node to configure DMA transfer.
Finally, I looped TX/RX using the appropriate PINs on t…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@rt-2pm2
Comment options

Answer selected by JarmouniA
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area: UART Universal Asynchronous Receiver-Transmitter platform: STM32 ST Micro STM32
2 participants