cancel
Showing results for 
Search instead for 
Did you mean: 

Bug on programming GPDMA transfer (ADC2)

Karakala
Associate

I would like to report a bug, I post it here as so anybody can read it.

The bug concerns the GPDMA on STM32H563, but maybe it could happen on others MCUs. I wanted to use a GPDMA1 Channel from a ADC2 request, my Channel was correctly initialized, but the transfer between the ADC->DR and my buffer wasn't realized. I initialized correctly the Channel, with the correct Source and Destination addresses, in Circular Mode, from Peripheral To Memory, in Half Word size on the two sides, with destination address increment... I checked all of my configuration.
Until I checked the registers themselves... The REQSEL bits in the CxTR2 register of GPDMAx weren't initiliazed, they were equal to 0 instead of 1. These bits indiquates on which hardware request the transfer is done, something we configure in STM32CubeMX and should have been done correctly at the code generation... I added so this call in the ADC configuration function :

LL_DMA_SetBlkHWRequest(GPDMA1, LL_DMA_CHANNEL_1, LL_GPDMA1_REQUEST_ADC2);			//Set Channel 1 hardware request to ADC2

After adding this, it worked.

 

 

0 REPLIES 0