2019-03-29 03:41 AM
I'm new to the topic and have a basic question.
I set up a ADC_DMA transfer to read sensor values: HAL_ADC_Start_DMA(&hadc1, (uint32_t*)&ADC1ConvertedValue, 1)
This works to always update the ADC1ConvertedValue variable to the latest value.
But how can I adjust my buffer size? In the end I would like to read for example 1000 values, then get an interrupt and use those 1000 values all at a time.
Thanks a lot and forgive me if the question is stupid ;)
2019-03-29 05:21 AM
Use dma cyclically on 2000 samples. Half transfer 1000 interrupt will occur so you can process 1000 samples in the same time it wilk take to receive the other half.