Skip to main content
Emilmart
Associate III
Jun 18, 2021 6:38 AM UTC
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
Jun 21, 2021 1:01 PM UTC

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
Jun 18, 2021 1:36 PM UTC

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
Jun 19, 2021 3:46 PM UTC

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

MM..1
Super User
Jun 20, 2021 8:55 AM UTC

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

Emilmart
EmilmartAuthorBest answer
Associate III
Jun 21, 2021 1:01 PM UTC

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
Aug 19, 2024 2:02 PM UTC

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

 

Thanks

A.R.