Access function for EXTI handle of a timer
Hello,
I configured TIM5 to generate a signal out to a pin using STM32CubeMX2 for a Nucleo-C562RE board. I enabled the EXTI interrupt for the pin in the timer configuration to get EXTI6 interrupts on the falling edge. I also enabled the use of register callbacks for EXTI.
The problem that I am having is that I cannot find the function to retrieve hEXTI6 to register the EXTI callback. I looked in the mx_tim5.h/c and in mx_gpio_default.h/c. I had no problem getting the EXTI handles for GPIO EXTI (for example mx_gpio_default_exti7_gethandle()) and getting TIM handles (mx_tim5_gethandle()).
To make the code work I had to add mx_gpio_default_exti6_gethandle() prototype to mx_tim5.h and the implementation below to mx_tim5.c:
hal_exti_handle_t *mx_gpio_default_exti6_gethandle(void)
{
return (&hEXTI6);
}
Maybe the definition/function is there but I cannot find it or maybe there is some additional configuration to be done in STM32CubeMX2. I attached my ioc2 file.
Regards,
Gil
