cancel
Showing results for 
Search instead for 
Did you mean: 

ADC run by DMA & TouchGFX DCache issue

Emilmart
Senior

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 !

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

5 REPLIES 5
MM..1
Chief II

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

I use circular on F4 and dcache without troubles.

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

MM..1
Chief II

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

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 III

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

 

Thanks

A.R.