tao_z
2021-06-27 b34d5dbff89fd992af8196c747e18a8933d0c729
USR/SRC/gd32e23x_it.c
@@ -36,6 +36,7 @@
#include "gd32e23x_it.h"
#include "motor.h"
#include "os_task.h"
/*!
    \brief      this function handles NMI exception
@@ -141,7 +142,7 @@
*/
void SysTick_Handler(void)
{
    delay_decrement();
    OS_TickFlag = 1;
}
/*!
    \brief      this function handles EXTI4-15 exception
@@ -151,5 +152,26 @@
*/
void EXTI4_15_IRQHandler(void)
{
    HAL_HallExti_TriggerCallback();
    if (RESET != exti_interrupt_flag_get(EXTI_4 | EXTI_5 | EXTI_15))
    {
        HAL_HallExti_TriggerCallback();
    }
    exti_interrupt_flag_clear(EXTI_4 | EXTI_5 | EXTI_15);
}
/*!
    \brief      this function handles time2
    \param[in]  none
    \param[out] none
    \retval     none
*/
void TIMER2_IRQHandler(void)
{
    if (SET == timer_interrupt_flag_get(TIMER2, TIMER_INT_FLAG_UP)) //time2 count up overflow
    {
        BLDC_SpeedAndPID();
        timer_interrupt_flag_clear(TIMER2, TIMER_INT_FLAG_UP);
    }
}