ADC data is transferred by DMA but no values in memory, just 0 (Nucleo-H734ZI2)
I am taking the values from adc1 and sending them via DMA1 to a memory location. I had followed a tutorial for the STM32F series, but I have also looked at the example code in the STMCube IDE. But it still does not work.
I got the ADC_DMA example to work and give me values. But I want to get it to work when I can configure the chip pins via the.IOC file.
I feel like setting up a project with the ability to set pins this way is better, but am I right?
On my Nucleo board, LD8 at the bottom of the board next to the label VBUS lights up when running the program. I can't find anything which tells me why this is. But could this be an indication of my problem?
I have attached some of my code, as hopefully, it may answer some questions. I can't attach it all as it is "too large."
Sorry if my post is confusing. Thank you in advance for any help.
#define ADC_CONVERTED_DATA_BUFFER_SIZE ((uint32_t) 32) /* Size of array aADCxConvertedData[] */
ALIGN_32BYTES (static uint16_t aADCxConvertedData[ADC_CONVERTED_DATA_BUFFER_SIZE]);
if (HAL_ADC_Start_DMA(&hadc1,
(uint32_t *)aADCxConvertedData,
ADC_CONVERTED_DATA_BUFFER_SIZE
) != HAL_OK)
{
Error_Handler();
}