Hello @HugoSTM32 ,
Welcome to ST's community!
To resolve the issue where the second ADC channel consistently reads zero, please use a buffer of type uint16_t for the ADC DMA data, as recommended by @TDK . This type ensures proper data size and will naturally be aligned to a 4-byte boundary, which is important for reliable DMA operation on STM32H7 devices.
Additionally, verify that the GPIO pins corresponding to ADC_CHANNEL_0 and ADC_CHANNEL_1 are correctly configured in analog mode with no pull-up or pull-down resistors, for example:
GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1; //PA0 and PA1 as an example
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
For more guidance on configuring the ADC on STM32H7 devices, please refer to the application note
AN5354.
We look forward to hearing about your progress and are here to assist you further if needed.
Kind regards,
DHIF Khaled
"Please mark my answer as best by clicking on the “Accept as solution"" button if it fully answered your question. This will help other users find this solution faster."