electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

MSP430F1611 interrupt problem


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> MSP430F1611 interrupt problem
Author Message
Beenaplaye



Joined: 23 Aug 2009
Posts: 9
Location: Belgium


Post01 Nov 2009 15:41   

MSP430F1611 interrupt problem


Hi guys,


My program doesnt go in the interrupt routine from TimerB or TimerA.

Code:

int main( void )
{
  // Stop watchdog timer to prevent time out reset
  WDTCTL = WDTPW + WDTHOLD;
  DCOCTL = 7;
  BCSCTL1 &= 0x7F;
  // set clock on 8.000Mhz clock and put it on MCLK and SMCLK
    do
    {
      unsigned char i = 0xFF;
      IFG1 &= ~OFIFG;                     // Clear OSCFault flag
      for (; i > 0; i--);         // Time for flag to set
    }
    while ((IFG1 & OFIFG) == OFIFG);      // OSCFault flag still set?               
    BCSCTL2 |= 0x8A;                      // MCLK = XT2 (safe) SMCLK = XT2/2
 
   
        P4SEL |= 0x40;         
        P4DIR |= 0x40;
         
         TBCCR0 = 200;               // geeft een periode van 5khz bij 8 Mhz clock
         TBCCR6 = 100;               // genereerd negatieve spanning voor scherm
         TBCCR1 = 20;
         TBCCTL0 = 0;             // enable timer interrupt CCIFG0
         TBCCTL1 = CCIE;             // enable timer interrupt CCIFG0
         TBCCTL6 = 0x00C0;           // mode 6 pwm op uitgang TB6
         TBCTL = 0x02D6;            // start timer
         
         
         TACCTL0 = 0;
         TACCR0 = 200;
         TACTL = 0x02D6;            // start timer
   
     
 
  //return 0;
}

#pragma vector=TIMERB0_VECTOR
__interrupt void Timer_B0_ISR(void)
{
   P2OUT ^= 0x01;

}

#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A0_ISR(void)
{
       P2OUT ^= 0x01;
}


TBR and TAR is counting. The correct flags are set. I realy dont have a clue what's wrong.
Back to top
Google
AdSense
Google Adsense




Post01 Nov 2009 15:41   

Ads




Back to top
bobcat1



Joined: 10 Jul 2002
Posts: 1118
Helped: 48


Post07 Nov 2009 9:02   

Re: MSP430F1611 interrupt problem


Hi

Compeer your software to routine given by TI for MSP430f1xxx

Or even first run TI routine to check whether your hardware function OK

All the best

Bobi

The microcontroller specialist
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> MSP430F1611 interrupt problem
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
MSP430F1611 (2)
LPC interrupt problem (2)
LPC interrupt problem (2)
8051 Interrupt problem (18)
pic16f84a interrupt problem (1)
RB interrupt problem in PIC (1)
Pic16f84a interrupt problem (2)
PIC18 & Interrupt Problem (3)
Problem on RB0 interrupt in HT-PICC (2)
RCTIME + TMR0 interrupt problem! headache... (10)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS