Skip to main content
Adriano Melis
Associate III
June 10, 2026
Solved

HAL_NVIC_EnableIRQ() not generated with checkbox enabled for EXTI

  • June 10, 2026
  • 2 replies
  • 67 views

The call to

HAL_NVIC_EnableIRQ(EXTI3_IRQn); 

is not generated with the checkbox enabled in the GPIO/NVIC panel in gpio.c

However:

the call for HAL_NVIC_SetPriority() is generated correctly.


MCU: STM32L496ZGTx

STM32CubeIDE: Version: 1.17.0

pads: PD3, PD4 set up as EXTI, NVIC enabled for both.

generated code: (section of gpio.c):

 
/* EXTI interrupt init*/
HAL_NVIC_SetPriority(EXTI3_IRQn, 0, 0);
HAL_NVIC_SetPriority(EXTI4_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(EXTI4_IRQn);

HAL_NVIC_EnableIRQ(EXTI3_IRQn);

is missing.


 

Best answer by Mahmoud Ben Romdhane

Hello ​@Adriano Melis 

I reproduced the behavior and the HAL_NVIC_EnableIRQ(EXTI3_IRQn); was generated on gpio.c file.

I recommend that you use the latest STM32CubeMX Version 6.17.

I will be waiting for your feedback.

Thanks.

MAHMOUD

 

2 replies

ST Technical Moderator
June 10, 2026

Hello ​@Adriano Melis 

Let me thank you for posting.

For more investigation, could you please provide your Ioc.File.

Thanks.

Mahmoud

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
ST Technical Moderator
June 11, 2026

Hello ​@Adriano Melis 

I reproduced the behavior and the HAL_NVIC_EnableIRQ(EXTI3_IRQn); was generated on gpio.c file.

I recommend that you use the latest STM32CubeMX Version 6.17.

I will be waiting for your feedback.

Thanks.

MAHMOUD

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.