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
  • Most processors needs to use some magic keyword (the keyword name depends on compiler) like __irq, __interrupt or similar for interrupt handlers, to tell the compiler to add special entry/exit code to properly save/restore processor state.

    But ARM has added extra hardware intelligence in the Cortex chips to make interrupts look like normal function calls. So no special entry/exit code is needed for the interrupt handlers. That also means you can use 100% C code for a Cortex-M3 chip instead of having a need for a startup file written in assembler.

Reply
  • Most processors needs to use some magic keyword (the keyword name depends on compiler) like __irq, __interrupt or similar for interrupt handlers, to tell the compiler to add special entry/exit code to properly save/restore processor state.

    But ARM has added extra hardware intelligence in the Cortex chips to make interrupts look like normal function calls. So no special entry/exit code is needed for the interrupt handlers. That also means you can use 100% C code for a Cortex-M3 chip instead of having a need for a startup file written in assembler.

Children