2023-09-27 04:38 AM
Hi ST community.
I am in the process of building an audio recorder similar to the one in this video (12 bit ADC to Wav via FATFS and SDIO)
(223) STM32 Audio Recorder 2: SD Card || SDIO and FatFs stack - YouTube
I followed the instructions of the following stm32 basics video for initializing the DMA however used the SWV Time graph in cube ide to get a reading. Which just shows random noise, not responding to the input I am giving it via a potentiometer test input(powered by the 3.3V out on the dev board)
(223) STM32CubeMX basics: 13.2 STM32Cube HAL labs ADC - Lab ADC DMA - YouTube
I am using an STM32F401Re board
continuous conversion mode and DMA cont. req are enabled with the PCLCK2 divide by 4 yielding 1.25MHZ sampling rate.
If anyone has any suggestions to help me fix this I would greatly appreciate it as its quite urgent.
Did modify the callback function in main as follows
void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef* hadc){
sample_adc = data_adc[0];
}
with the above array and sample adc vairable declaired globally.
Thanks for your help in advance, Mikael