7 struct interrupt_frame {
20 /* void * systick_handler() {
22 // *RANDOM_ADDR = (volatile uint32_t) 0x10101010 ;
26 __attribute__ ((interrupt))
27 void * systick_handler(struct interrupt_frame * frame) {
29 uart_puts("TICKING\n");
30 // addrtohex((uint32_t) 0x12345678);
37 /* Enable the counter and enable the interrupt
38 * associated with it */
39 *STK_CTRL = (volatile uint32_t) 0x00000003;
41 /* The counter reload register here holds
42 * 0x1000 -- that's 4096 clock cycles -- if
43 * it is down to zero it is restores the value */
44 *STK_RELOAD = (volatile uint32_t) 0x00000400;
46 /* Every time the counter counts down to zero
47 * a systick exception is asserted. Systick has
48 * exception number 15. in the vector table */
49 ivt_set_gate(15, systick_handler, 0);