The SysTick configuration ... ABC_IRQ_DISABLE(ABC_INT_SCHEDULER); /* Set the default priority level to be masked */ CPUbasepriSet(ABC_INT_PRIORITY_MASKED); /* set the priority for the systems interrupts */ MAP_IntPrioritySet(ABC_INT_SYSTICK, ABC_INT_PRIORITY_0); MAP_IntPrioritySet(ABC_INT_SCHEDULER,ABC_INT_PRIORITY_SCHEDULER); MAP_IntPrioritySet(ABC_INT_SVCALL, ABC_INT_PRIORITY_3); ABC_IRQ_ENABLE(ABC_INT_SCHEDULER); ... // Configure SysTick for a periodic interrupt. (void) MAP_SysTickPeriodSet( (uint32_t) cpuinfo_drv_get_frequency() / SYSTICKHZ); (void) MAP_SysTickEnable(); (void) MAP_SysTickIntEnable(); Where ... #define ABC_INT_SYSTICK FAULT_SYSTICK #define ABC_INT_SCHEDULER FAULT_PENDSV #define ABC_INT_SVCALL FAULT_SVCALL ... #define ABC_INT_PRIORITY_0 (0x00 << 5) #define ABC_INT_PRIORITY_1 (0x01 << 5) #define ABC_INT_PRIORITY_2 (0x02 << 5) #define ABC_INT_PRIORITY_3 (0x03 << 5) #define ABC_INT_PRIORITY_4 (0x04 << 5) #define ABC_INT_PRIORITY_5 (0x05 << 5) #define ABC_INT_PRIORITY_6 (0x06 << 5) #define ABC_INT_PRIORITY_7 (0x07 << 5) // The default IRQ priority of scheduler #define ABC_INT_PRIORITY_SCHEDULER ABC_INT_PRIORITY_6 // The IRQ priority which is by default masked #define ABC_INT_PRIORITY_MASKED ABC_INT_PRIORITY_7 ... CPUbasepriSet(uint32_t ui32NewBasepri) { // // Set the BASEPRI register // __asm(" msr BASEPRI, r0\n" " bx lr\n"); } ... // enable/disable all interrupts #define ABC_IRQ_ENABLE_ALL (void) MAP_IntMasterEnable() #define ABC_IRQ_DISABLE_ALL (void) MAP_IntMasterDisable() // enable/disable specific interrupts #define ABC_IRQ_ENABLE(IRQ_ID) abc_irq_enable(IRQ_ID) #define ABC_IRQ_DISABLE(IRQ_ID) abc_irq_disable(IRQ_ID) ... ABC_STATIC_INLINE void abc_irq_enable(unsigned int irq_id) { if (irq_id != ABC_INT_SCHEDULER) { MAP_IntEnable(irq_id); } else { MAP_IntPrioritySet(FAULT_PENDSV, ABC_INT_PRIORITY_SCHEDULER); } } ABC_STATIC_INLINE void abc_irq_disable(unsigned int irq_id) { if (irq_id != ABC_INT_SCHEDULER) { MAP_IntDisable(irq_id); } else { MAP_IntPrioritySet(FAULT_PENDSV, ABC_INT_PRIORITY_MASKED); } } And the Systick ISR handler ... /*** * Process tick of the system timer. ***/ void SysTick_Handler(void) { ABC_IRQ_ACK(ABC_INT_SYSTICK); // call the system tick handler abc_sys_timer_tick(); // trigger clocks abc_tmr_clock_trigger(CLOCK_REALTIME); ABC_IRQ_EOI(ABC_INT_SYSTICK); } Where ... /*** * Acknowledge interrupt **/ #define ABC_IRQ_ACK(irq_nr) ABC_IRQ_DISABLE_ALL /*** * End of interrupt **/ #define ABC_IRQ_EOI(irq_id) if (0 == abc_spin_irq_count) { ABC_IRQ_ENABLE_ALL; }