2021-07-05 11:30 AM
I am using NUCLEO-H743ZI2. I configure 6 channels adc with dma reading. I am using SW4STM32. I also use stm32cube to configure the project, and I notice id file to configure data to DTCMRAM, I change data to ram_d1 manually. At the beginning everything is working properly. however, after my program is getting bigger and variables are becoming more, adc dma has some issue, for example, the first 4 channels are working and the last 2 channels are not updated anymore after I add variables, delete variables or more variables in .h files. I am not clear what is problem? I am thinking whether I move DMA to RAM_D2, and leave variables are in RAM_D1? is it possible?
2021-07-05 06:00 PM
Adding variables in the .h file should not affect how ADC+DMA operates. Consider showing more of your code.
> for example, the first 4 channels are working and the last 2 channels are not updated anymore
How do you know they're not updated? As opposed to the value just staying the same. Does the ADC or DMA report any error flags, perhaps an overrun?
2021-07-06 05:59 AM
I got some strange things. I have some structure and union structure. When I change those structure, for example, add one variables, or delete variables, the reading memory of ADC (DMA) are messy. I am thinking the problem comes from memory alignment because there are int8_t, int16_t and int32_t/float in my structure.