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");
29 /* Enable the counter and enable the interrupt
30 * associated with it */
31 *STK_CTRL = (volatile uint32_t) 0x00000003;
33 /* The counter reload register here holds
34 * 0x1000 -- that's 4096 clock cycles -- if
35 * it is down to zero it is restores the value */
36 *STK_RELOAD = (volatile uint32_t) 0x00400000;
38 /* Every time the counter counts down to zero
39 * a systick exception is asserted. Systick has
40 * exception number 15. in the vector table */
41 ivt_set_gate(15, systick_handler, 0);