-
Notifications
You must be signed in to change notification settings - Fork 1k
Add missing timer IRQHandler and fix wrong timer IRQHandler #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cores/arduino/stm32/timer.c
Outdated
* @param None | ||
* @retval None | ||
*/ | ||
#if defined(STM32F0xx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use TIM1_IRQHandler and define the proper one like the other (#define TIM1_IRQHandler TIM1_BRK_UP_TRG_COM_IRQHandler ...) in timer.h
in order to be homogeneous?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried but when timer 10 or 16 are present, there is an error about redefinition:
'error: redefinition of 'TIM1_UP_TIM16_IRQHandler'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On which MCU ?
however, for TIM10 handler, it seems strange for STM32F1xx
+#elif defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32F7xx)
void TIM1_UP_TIM10_IRQHandler(void)
but
+#if defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32F7xx)
if(timer_handles[9] != NULL) {
HAL_TIM_IRQHandler(timer_handles[9]);
{ | ||
if(timer_handles[0] != NULL) { | ||
HAL_TIM_IRQHandler(timer_handles[0]); | ||
} | ||
|
||
#if defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32F7xx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this one could be removed as handle by TIM10_IRQHandler
cores/arduino/stm32/timer.c
Outdated
if(timer_handles[9] != NULL) { | ||
HAL_TIM_IRQHandler(timer_handles[9]); | ||
} | ||
#endif | ||
|
||
#if defined(STM32F1xx) || defined(STM32F3xx) || defined(STM32L4xx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this one could be removed as handle by TIM16_IRQHandler
Signed-off-by: fpr <[email protected]>
Fix issue #111