[cpu/cc430 cpu/msp430-common]

* fixed timera1 irq
dev/timer
Oliver Hahm 13 years ago
parent 8de4898694
commit c750108ca5

@ -15,17 +15,15 @@ void timerA_init()
TA0CTL = TASSEL_1 + TACLR; // Clear the timer counter, set ACLK
TA0CTL &= ~TAIE; // Clear the IFG
/* volatile unsigned int *ccr = &TA0CCR0;
volatile unsigned int *ccr = &TA0CCR0;
volatile unsigned int *ctl = &TA0CCTL0;
for (int i = 0; i < ARCH_MAXTIMERS; i++) {
*ccr = 0;
*ctl &= ~(CCIFG);
*ctl &= ~(CCIE);
*(ccr+i) = 0;
*(ctl+i) &= ~(CCIFG);
*(ctl+i) &= ~(CCIE);
}
*/
TA0CCR0 = 0;
TA0CTL |= MC_2;
}
@ -43,12 +41,12 @@ interrupt(TIMER0_A1_VECTOR) __attribute__ ((naked)) timer0_a1_5_isr(void) {
short taiv = TA0IV;
short timer;
switch(taiv) {
case TAIFG:
if (!(taiv & TAIFG)) {
// case TAIFG:
timer = (taiv/2);
TA0_unset(timer);
int_handler(timer);
break;
/* break;
// Timer0_A3 Configurable periodic IRQ (used by button_repeat and buzzer)
case 0x06: // Disable IE
@ -66,7 +64,7 @@ interrupt(TIMER0_A1_VECTOR) __attribute__ ((naked)) timer0_a1_5_isr(void) {
TA0CCTL4 &= ~CCIE;
// Reset IRQ flag
TA0CCTL4 &= ~CCIFG;
break;
break;*/
}
__exit_isr();

@ -27,7 +27,7 @@
SubDir TOP cpu msp430-common ;
Module cpu : msp430-main.c cpu.c atomic.c irq.c flashrom.c ;
Module cpu : msp430-main.c cpu.c atomic.c irq.c ;
Module hwtimer_msp430 : hwtimer_cpu.c ;
UseModule cpu ;

@ -1,5 +1,4 @@
#include <stddef.h>
#include <msp430x16x.h>
#include <msp430/flash.h>
#include <irq.h>

Loading…
Cancel
Save