Skip to content

STM32 Zephyr 3.7.1-rc1 issue: E: Rx buffer should be placed in a nocache memory region #75032

Answered by ajarmouni-st
RobMeades asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @RobMeades

which uses async UART, though that may not necessarily be relevant

In the contrary, it's quite relevant as you apparently have CONFIG_DCACHEenabled in your project & you are using DMA (async UART => UART with DMA), & since STM32 UART driver does not yet handle cache coherency by itself, it checks if the buffers provided by the application are in a non-cached memory region before performing any transfer.
This behavior was introduced in #70503

The solution would be to either disable DCACHE, or put your UART buffers in a Nocache memory region as done in tests/drivers/uart/uart_async_api/src/test_uart_async.c.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by RobMeades
Comment options

You must be logged in to vote
0 replies
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 area: DMA Direct Memory Access platform: STM32 ST Micro STM32 area: Cache
2 participants