Associate II
August 5, 2026
Question
[NUCLEO-N657X0-Q] GPDMA wrong configuration for ADC
- August 5, 2026
- 0 replies
- 26 views
Dear forum,
I am trying to setup a simple application to sample an ADC channel with DMA and stream it via UDP to a Windows PC, so here’s what I did:
- I started from the sample project “Nx_UDP_Echo_Client”, provided by ST in FW pack;
- I configured the ADC peripheral to sample pin PA1 as in the sample project “ADC_SingleConversion_TriggerTimer_DMA”, and this is ok;
- I configured the GPDMA channel 0 in circular mode to copy ADC.DR into a buffer, following this and this;
- I put the DMA buffer in a dedicated memory region (AHBSRAM1), as suggested here;
- I configured the buffer memory region as NON CACHEABLE in MPU configuration, as suggested here;
- Finally I configured the RISAF in order to let the GPDMA have access to the buffer, as suggested here.
But still, when I try to activate the transfer with the HAL command HAL_ADC_Start_DMA, I get a “User setting error” (USEF bit in GPDMA_C0SR register) and the GPDMA channel is deactivated. Can you please help me in the debug?
The project, which is attached here, is running on NUCLEO-N657X0-Q board; the base project is the NetXDuo example “Nx_UDP_Echo_Client”.
Any help will be much appreciated!
Thanks.
