STM32 Zephyr 3.7.1-rc1 issue: E: Rx buffer should be placed in a nocache memory region
#75032
-
I am testing the move from Zephyr 3.6.0 to the 3.7.0-rc1 and our STM32F7 platform (which uses async UART, though that may not necessarily be relevant) throws a new error:
...and afterwards random crashes occur in All our RX buffers are just |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @RobMeades
In the contrary, it's quite relevant as you apparently have The solution would be to either disable DCACHE, or put your UART buffers in a Nocache memory region as done in |
Beta Was this translation helpful? Give feedback.
-
Hi, and thanks for the swift response. I haven't specifically enabled Configuring looks frighteningly complicated; I will chicken out and disable it for now. Will confirm back here if that fixes things for me... |
Beta Was this translation helpful? Give feedback.
-
Confirmed that removes the error message, though a crash remains, now somewhere in the Zephyr heap, I will debug that separately.
|
Beta Was this translation helpful? Give feedback.
Hi @RobMeades
In the contrary, it's quite relevant as you apparently have
CONFIG_DCACHE
enabled 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
.