cancel
Showing results for 
Search instead for 
Did you mean: 

How do you disable ADC DMA interrupts in cubeMX?

GBert.2
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions
GwenoleB
ST Employee

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é

View solution in original post

4 REPLIES 4
GwenoleB
ST Employee

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é

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

GwenoleB
ST Employee

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
Senior

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