STM32F769I-DISCO ADC and DAC with DMA not working correctly
- August 22, 2021
- 1 reply
- 3035 views
goodAfternoon,
I am making a TouchGFX project that needs to use the DAC and ADC present on the discovery board using the DMA.
Does the STM32F769I-DISCO TouchGFX code have something that makes so that the DMA doesn't work correctly by default? If so what should I change/add in the TouchGFX code so that the DMA starts working normally?
I made some code in an STM32CubeIDE project and the ADC and DAC work normally.
When I put the same code on the TouchGFX program the ADC callback gives wrong vaiues and the DAC doesn't change value (it has a lookup table of a sinus and is triggered by a timer), I should see a sinus...
If more code is needed just ask, I will gladly write it here if it makes it easier to understand the problem.
Here is the screen that should start the DAC and a screen of part of the MPU settings (generated by touchGFX).
After some tinkering I think the problem is due to the fact that the D-Cache and I-CAche are active and the memory layout with MPU done by TouchGFX. I can't understand how to change the parameters so to make the DMA work correctly with the buffers i create. Did someone had this issue and tried to solve it?
Thankyou for the kind help
-Marco
