Skip to main content
Emilmart
Associate III
Solved

ADC run by DMA & TouchGFX DCache issue

Hi,

I have a custom board with STM32H7 & TouchGFX.

I'm using DMA triggered by interrupt to sample datas with my ADC.

Without DCache enable, it's working well. But TouchGFX fails if DCache is disabled (problem meet by others here: https://community.st.com/s/question/0D53W00000S752ySAB/touchgfx-4160-issue-when-dcache-is-disabled )

And if my DCache is enabled, my ADC DMA sampling fails if I move from one screen to an other. (the DMA appears to stop)

I was thinking not using DMA for ADC but it kinds of mess with the generated code.

Any ideas how I can keep both DMA with ADC & TouchGFX running ?

Thanks !

This topic has been closed for replies.
Emilmart
EmilmartBest answer
Associate III

I'm sure that it may work like you said, but in the mean time I use the following workaround which fix the problem:

- keep DCache enabled in cubeMX

- disable DCache in main usercode (SCB_DisableDCache();)

thanks

5 replies

MM..1
Super User

How type DMA you use circular or restarted by trigger? Same core which one?

I use circular on F4 and dcache without troubles.

Emilmart
EmilmartAuthor
Associate III

I use a circular DMA with sampling triggered by rising edge of timer. It's cortex m7 (stm32h7a3zi)

MM..1
Super User

Try without trigger, set conversion time and continuos mode. If work porblem is timer...

Emilmart
EmilmartAuthorBest answer
Associate III

I'm sure that it may work like you said, but in the mean time I use the following workaround which fix the problem:

- keep DCache enabled in cubeMX

- disable DCache in main usercode (SCB_DisableDCache();)

thanks

AntoR
Associate II

I've same problem and what you suggest work, but, why appear this problem?

 

Thanks

A.R.