7 struct interrupt_frame {
19 //__attribute__ ((interrupt))
20 void * systick_handler(/* struct interrupt_frame * frame */) {
22 // uint32_t volatile status;
23 //uart_puts("TICKING\n");
30 /* Enable the counter and enable the interrupt
31 * associated with it */
32 *STK_CTRL = (volatile uint32_t) 0x00000003;
34 /* The counter reload register here holds
35 * 0x1000 -- that's 4096 clock cycles -- if
36 * it is down to zero it is restores the value */
37 *STK_RELOAD = (volatile uint32_t) 0x00400000;
39 /* Every time the counter counts down to zero
40 * a systick exception is asserted. Systick has
41 * exception number 15. in the vector table */
42 ivt_set_gate(15, systick_handler, 0);