Skip to main content
Emilmart
Associate III
June 18, 2021
Solved

ADC run by DMA & TouchGFX DCache issue

  • June 18, 2021
  • 3 replies
  • 1893 views

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 !

Best answer by Emilmart

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

3 replies

MM..1
Chief III
June 18, 2021

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
June 19, 2021

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

MM..1
Chief III
June 20, 2021

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

Emilmart
EmilmartAuthorBest answer
Associate III
June 21, 2021

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
August 19, 2024

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

 

Thanks

A.R.