Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Watch Dog Timer Interrupt not working

$
0
0

Hello,

 

a programm that was working on the MSP430G2553 is no not working any more. After a lot of trials, I found out, that my millis() function is not working any more. Since my Arduino times I like a function that is giving me ms back. Makes a lot of things easy. For this reason I set

WDTCTL = WDT_MDLY_0_5; // (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1) /* 0.5ms

at the end of my program, I call my interrupts, in this case:

#pragma vector=WDT_VECTOR
__interrupt void WDT(void){
        doublemillis++;
}

and finally to come to my ms:

// Function that is reuturning ms since startup
unsigned long millis(){
    return doublemillis >> 1; // Double Millisecondy divided by 2
}

But now, nothing is changing, the doublemillis and the millis always stay 0. So my interrupt is not working any more.

The programm is compiled with msp430-gcc:

msp430-gcc -mmcu=msp430g2553 -o led ./led.c

and then writen to the chip with mspdebug. Does anyone has an idea, why my interrupt is not working any more?

The complete  can be found here:

 

http://freundederlust.de/horst/doku.php?id=brainmsp430

 

The program itself seems to run, if i switch pin 1.0 to high the led is on. But all interrupts seem not to work any more.

Any help is welcome.

 

Greetings

 

Sven


Viewing all articles
Browse latest Browse all 2077

Trending Articles