-
Hi Everyone, Before opening a formal issue, I wanted to know if someone had some problem running the UART async API sample on a STM32. I am trying to run the sample on a STM32 Discovery Board and I am getting an error at the point where the transmission request is issued. Precisely, the For example, on an digital analyzer I see something like:
Best Step to reproduce
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I don't have the stm32f4_disco available, so I went for a nucleo_f411re instead. In my case, I used USART1, mapped on PB_6 & PB_7. As you might see with Kconfig search / menuconfig, the UART_ASYNC_API requires DMA to be configured for the STM32 boards. In my case, the devicetree overlays looks like this:
Please check your board/Soc reference manual for the exact DMA configuration. See Related discussion. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Hi @rt-2pm2 my turn with the late answer... 😄
Guess, I got lucky by picking the nucleo_f411re.. During the
Then I used menuconfig to work through to missing dependencies, and started my search... Redoing the exercise with the stm32f4_disco unfortunately doesn't bring any warnings, because dma1 on that board is enabled in the devicetree, but not dma2. To discover the link, you need to look at what causes The way you can work through dependencies (apart from looking at the corresponding Kconfig) is using the search option (/) and the Symbol info (?) You see the direct dependencies:
Here both |
Beta Was this translation helpful? Give feedback.
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…