Hello,
In my program I need periodically blinking led.
I downloaded the WiFiServerApplication from the TI site. I'm using Timer1_B3 to create interrupt and for led blinking.
void blinkLedTimerInitFunc() // INIT TIMER
{
TB1CCTL0 &=~CCIE;
TB1CCR0=2000;
TB1CTL |=TBSSEL_1 ID_3 MC_1 TBIE TBIFG;
TB1CCTL0 |=CCIE;
}
// My interrupt:
#pragma vector=TIMER1_B0_VECTOR
__interrupt void TimerB1Test(void)
{
toggleLed(LED8);
TB1CCR0 =2000;
}
#pragma vector=TIMER1_B1_VECTOR //without it it's not working
__interrupt void TimerB1Test(void)
{
// NOTHING HERE
}
Ok. My question:
When I placed the blinkLedTimerInitFunc() function in file demo.c at line 222 (after unsolisicted_events_timer_init() function), the module connects to the WiFi, runs the webserver, LED8 is blinking, but all other interrupts are not working (I think so, because I tried to enter the web server from my laptop, but with no result).
When I placed the blinkLedTimerInitFunc() function before the main while loop (before line 120 in demo.c), the module connects to the WiFi, LED8 is blinking, but web-server is not running.
When I erased the blinkLedTimerInitFunc() function - the module conects to the WiFi, runs the webserver and I can enter to the server with my laptop.
Understood for me that the problem is timer definition and interrupts.
Please help me!!
Thanks a lot!
Mike