This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Interrupt on Nuvoton NUC100LD2DN

Hi, I'm newbie on keil & I'm trying learn ARM Cortex-M0 from Nuvoton. I confuse how to use interrupt on timer funtion. How i can get interrupt from overflow? I'm familiar before with AVR, on atmel studio for interrupt I just call function

 ISR(TIMER1_OVF_vect )
{
  PORTB |= _BV(0);
  reti();
}

And how about nuvoton?
Help me please..

Parents
  • Normal Function, ie no magically entry/exit requirements to save context, or return-from-interrupt

    extern volatile uint32_t SystemTick;
    
    /**
      * @brief  This function handles SysTick Handler.
      * @param  None
      * @retval None
      */
    
    #define TICK_RATE 1  // in milliseconds
    
    void SysTick_Handler(void)
    {
      // Free running millisecond counter for timeouts
    
      SystemTick += TICK_RATE; // 1 ms tick count
    }
    

Reply
  • Normal Function, ie no magically entry/exit requirements to save context, or return-from-interrupt

    extern volatile uint32_t SystemTick;
    
    /**
      * @brief  This function handles SysTick Handler.
      * @param  None
      * @retval None
      */
    
    #define TICK_RATE 1  // in milliseconds
    
    void SysTick_Handler(void)
    {
      // Free running millisecond counter for timeouts
    
      SystemTick += TICK_RATE; // 1 ms tick count
    }
    

Children