Skip to main content
GBert.2
Senior
February 1, 2022
Solved

How do you disable ADC DMA interrupts in cubeMX?

  • February 1, 2022
  • 4 replies
  • 4870 views

For some reason, CubeMX won't let me disable the DMA IRQ in the ADC configuration panel.

0693W00000JOBXAQA5.png 

The ability to deactivate ISR is important when the ADC is configured in continuous mode.

Because my ADC conversion is small, the ISR are generated at a very high frequency; completely choking the CPU.

How do you disable ADC DMA interrupts in cubeMX?

---

Build info

STM32CubeIDE

Version: 1.8.0

Build: 11526_20211125_0815 (UTC)

OS: Windows 10, v.10.0, x86_64 / win32

Java version: 11.0.11

This topic has been closed for replies.
Best answer by GwenoleB

Dear Gabriel,

0693W00000JOHDkQAP.pngThere is an option in System Core - NVIC called Force DMA channels Interrupts. Please unchecked this option and you can now disable DMA interrupt from NVIC settings in ADC1 menu or directly in NVIC menu.

Best regards,

Gwénolé

4 replies

ST Employee
February 2, 2022

Hello @GBert.2​ 

Can you share with me the product you use and also the CubeMX version.

I will try to reproduce on my side.

For now, you can easily disable generated IRQ by commenting HAL_NVIC_EnableIRQ in your code located in MX_DMA_Init function.

Best Regards,

Gwénolé

GBert.2
GBert.2Author
Senior
February 2, 2022

Hi Gwénolé,

Thanks for your support.

> Can you share with me the product you use and also the CubeMX version.

Here it is:

0693W00000JOH1KQAX.pngCubeMX is 6.4.0.

> For now, you can easily disable generated IRQ by commenting HAL_NVIC_EnableIRQ in your code located in MX_DMA_Init function.

Yeah. But, as you know, this will break every time I regenerate the project.

Regards,

Gabriel

GwenoleBBest answer
ST Employee
February 2, 2022

Dear Gabriel,

0693W00000JOHDkQAP.pngThere is an option in System Core - NVIC called Force DMA channels Interrupts. Please unchecked this option and you can now disable DMA interrupt from NVIC settings in ADC1 menu or directly in NVIC menu.

Best regards,

Gwénolé

GBert.2
GBert.2Author
Senior
February 2, 2022

Dear Gwénolé,

​

Thanks for your help.

This is exactly what I needed.

I'm not sure why this would be set by default ¯\_(ツ)_/¯

Thanks again.

​

Regards,

Gabriel

​