STM32 DISCUSSION

STM32H7 DMA buffer looks stale: when should cache coherency be investigated?

Started by uditkhanna STM32H7DMAdata cachebuffer ownershipCortex-M7
3 replies 248 views 4 participants
Latest activity · 27 Sep 2026

STM32H7 DMA buffer looks stale: when should cache coherency be investigated?

uditkhanna STM32 Forum
#1

Community replies 3

Re: STM32H7 DMA buffer looks stale: when should cache coherency be investigated?

#2

First confirm that the DMA can access the chosen memory region and that addresses and transfer sizes are correct. A valid CPU pointer does not guarantee DMA accessibility. Then consider whether CPU cache contents and memory contain different versions of the same buffer.

Re: STM32H7 DMA buffer looks stale: when should cache coherency be investigated?

#3

Define ownership during each transfer and follow the device's cache-maintenance guidance for direction, alignment and range. Cleaning and invalidating have different purposes. Invalidation of a cache line shared with unrelated dirty data can discard changes, so isolated, suitably aligned buffers matter.

Re: STM32H7 DMA buffer looks stale: when should cache coherency be investigated?

#4

Test with a changing pattern and inspect memory before and after each ownership transfer. Disabling cache temporarily may help diagnosis but is not automatically the best final design. Use a deliberate memory-region or maintenance strategy and retest under realistic interrupt and DMA load.

TEP COMMUNITY