timer interrupts hopefully work now (pwm and isr not yet working!)
[my-code/arm.git] / betty / interrupts.c
index ed33c15..24159c0 100644 (file)
@@ -158,11 +158,13 @@ void interrupt_tc_config(u8 tcnum,u8 mode,u8 cap,u32 psv) {
 
        if(tcnum==0) {
                T0TCR=0x03;
+               T0TC=0;
                T0CTCR=mode|(cap<<2);
                T0PR=psv;
        }
        else {
                T1TCR=0x03;
+               T1TC=0;
                T1CTCR=mode|(cap<<2);
                T1PR=psv;
        }