Single DMA in Dual regular simultaneous ADC mode: Only the master ADC value is saved in the buffer
So I wanted to use a single DMA with the Dual regular simultaneous ADC mode on a NUCLEO-L476RG. However I noticed that just the master ADC value was present in the buffer of the DMA, even though the Data width of the DMA is set to Word.
After some investigation, I found that in the file stm32l4xx_hal_msp.c in the function HAL_ADC_MspInit, automatically generated by STMCubeMX:
hdma_adc1.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD;
hdma_adc1.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;Changing manually DMA_PDATAALIGN_HALFWORD to DMA_PDATAALIGN_WORD is working, but I wanted to know if there is an option in STMCubeMX to configure that ?
FYI here is the parameters I set in STMCubeMX v5.6.0-RC6:
- ADC Master :

- ADC Slave :

- DMA :
