Skip to main content
ghibli
Associate II
August 5, 2026
Question

[NUCLEO-N657X0-Q] GPDMA wrong configuration for ADC

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:

  1. I started from the sample project “Nx_UDP_Echo_Client”, provided by ST in FW pack;
  2. I configured the ADC peripheral to sample pin PA1 as in the sample project “ADC_SingleConversion_TriggerTimer_DMA”, and this is ok;
  3. I configured the GPDMA channel 0 in circular mode to copy ADC.DR into a buffer, following this and this;
  4. I put the DMA buffer in a dedicated memory region (AHBSRAM1), as suggested here;
  5. I configured the buffer memory region as NON CACHEABLE in MPU configuration, as suggested here;
  6. 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.

 

2 replies

ST Technical Moderator
October 2, 2026

Hello ​@ghibli 

Did you try with the same DMA setting as in the example “ADC_SingleConversion_TriggerTimer_DMA”

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
ghibli
ghibliAuthor
Associate II
October 7, 2026

Hi ​@Saket_Om,

thanks for your reply. Yes I did, and everything works as expected in a standalone project; but when I integrate the ADC configuration in the Nx_UDP_Echo_Client project I get the user setting error.