How to use properly ADC to DMA, HAL_ADC_Start_DMA(&hadc1, (uint32_t*)array, 1000);
I want to make 1000 scans, I have the adc running at 1.5 Msps, 12 bit resolution on 180 Mhz Nucelo board.
when I put HAL_ADC_Start_DMA(&hadc1, (uint32_t*)array, 1000); in main(); it would run only once
I want a continues scan, it seams to be doing just that in while(); loop
but I think that I need some delay like
while();
{
HAL_ADC_Start_DMA(&hadc1, (uint32_t*)array, 1000);
HAL_Delay(1);
}
Fist question does it indeed take 1000 scans and puts in the array[1000];
Second how to properly implement it so I have access to data in array all the time.
And it look like I have to declare
uint32_t array[1000];
anything else like uint16_t array[1000]; wouldn't work
I am new to this and I do not understand fully all the code, what they do.
