Skip to main content
MM..1
Chief III
July 28, 2020
Question

Why CubeMX not allow ADC DMAContinuousRequests

  • July 28, 2020
  • 3 replies
  • 807 views

I define two channels scan mode ADC and need it leave run alltime over DMA.

CubeMX have this settings only disabled.

I overwrite init and it works, then i dont understand why CubeMX block this ?

ADC i need dma hw based and RTOS calculate over memory buffer .

Now i use 1024 samples per channel and ADC_SAMPLETIME_112CYCLES

This topic has been closed for replies.

3 replies

S.Ma
Principal
July 28, 2020

check the adc dma interrupt enable bits and decide what you want. seems hal adc dma function always enable interrupt for half and full transfer even in cyclic mode. at 1msps with 2 channels, it might make the core sluggish....

MM..1
MM..1Author
Chief III
July 28, 2020

I start with HAL_ADC_Start_DMA(&hadc1, (uint32_t*)adc_buf, 2048);

then i mean half and full dma interrupts is on 1024 (2ch x 512) and on full DMA. I dont see sluggish

prain
Visitor II
July 28, 2020

Unfortunately, cubemx can not setup for all the features of MCU. For professional firmware development, I recommend not to use cubemx.