2019-01-20 12:12 PM
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.
2019-01-20 01:42 PM
2019-01-20 03:04 PM
would you know if it is indeed 1.5 Msps, I am using Cube MX and it says there 12 bit resolution takes 15 clock cycles
But at the bottom there is also sampling time, it is a little confusing I have sampling time 3 cycles.
would the actual speed be 15 + 3 clock cycles. or it is independent.
or the sampling time is time to get the adc data already sitting in the buffer.
the highest speed is supposed to be 2.5 Msps but for lowest resolution 6 bits