Using memcpy to get data from ADC buffer to use elsewhere
Hello,
I am trying to use the memcpy function to transfer data from the ADC data buffer to a separate data buffer, but when I call memcpy, only the first 1400 of 6000 samples gets copied, while the remainder of the buffer does not get updated. I noticed this when I added a breakpoint after the memcpy function and when I output the new data on a DAC and saw the following on an oscilloscope, where the green toggle indicates when the HAL_ADC_ConvCpltCallback function is called, and the blue is the data being output by the DAC after being copied from the ADC buffer. The function being read at the ADC is a simple ramp function:
I am wondering if there is any specific reason this may be occurring. I am using DMA for the ADC (Continuous DMA requests enabled) and a DAC on the STM32F413 MCU. The only thing being done in the callback is a flag being set.
Thanks,
MC
