cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] STM32L462RE Interrupt Issues, Cannot get GPIO interrupts to work in my project.

AVins.1
Associate

[Solution] Code was moved around and then it compiled correctly. Misinterpretation of the problem.

IOC Configuration:

Pin PB9 - External Interrupt with Rising/Falling Edge trigger detection

Pull-Down

NVIC EXTI line [9:5] Enabled Preemption Priority 1 Sub Priority 0

Code Changes: Inside Main.c

/* USER CODE BEGIN WHILE */

void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)

 {

HAL_GPIO_WritePin(GPIOB, GPIO_PIN_11, GPIO_PIN_SET);

 }

To my understanding to accomplish the interrupt with a callback to turn an led on all I need to do is change the state of the pin from high to low or visa versa. Then override the _weak definition of HAL_GPIO_EXTI_Callback.

Any advice would be very helpful here but I have tried almost all of the different settings for registering the interrupts without any luck.

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @AVins.1​ and welcome to the Community 🙂

Thank you for updating your post and sharing the solution.

"[Solution] Code was moved around and then it compiled correctly. Misinterpretation of the problem."

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

1 REPLY 1
Imen.D
ST Employee

Hello @AVins.1​ and welcome to the Community 🙂

Thank you for updating your post and sharing the solution.

"[Solution] Code was moved around and then it compiled correctly. Misinterpretation of the problem."

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen