2023-03-13 08:05 AM
[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.
Solved! Go to Solution.
2023-03-15 11:47 AM
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
2023-03-15 11:47 AM
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