2024-07-04 04:47 AM
Hey guys.
I need to enable/disable the line 14 of the EXTI interrupts multiple times, using HAL
Do i just use the HAL_NVIC_DisableIRQ HAL_NVIC_EnableIRQ ( and HAL_NVIC_SetPriority whenever i re-enable the line?), providing the correct handle to the api each time?
Solved! Go to Solution.
2024-07-09 06:33 AM
Hello @AlexandrosAA,
You only need to set the priority once using HAL_NVIC_SetPriority unless you need to change the priority dynamically.
to enable the interrupt: HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
to disable the interrupt: HAL_NVIC_DisableIRQ(EXTI15_10_IRQn);
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.
2024-07-04 03:16 PM
To enable/disable EXTI interrupts, you can set and clear raising/falling edge detection bit of the needed line in EXTI registers EXTI_RTSR1 and/or EXTI_FTSR1. Leave the NVIC interrupt enabled. Not sure if the HAL library has a function for this. If not, do it without the HAL.
2024-07-09 06:33 AM
Hello @AlexandrosAA,
You only need to set the priority once using HAL_NVIC_SetPriority unless you need to change the priority dynamically.
to enable the interrupt: HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
to disable the interrupt: HAL_NVIC_DisableIRQ(EXTI15_10_IRQn);
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.