- OIER |= OIER_E0; /* enable match on timer 0 to cause interrupts */
- OSCR = 0; /* initialize free-running timer, force first match */
+ local_irq_save(flags);
+ OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */
+ OSMR0 = OSCR + LATCH; /* set initial match */
+ local_irq_restore(flags);