don't forget to call nvic_enable_irq(irq) to allow interrupts