|
From: | mario rossi |
Subject: | [Paparazzi-devel] Tiny 2.1 hangs up with a simple test program |
Date: | Thu, 8 May 2008 10:47:11 +0200 |
Hi, I'm trying to test my new Tiny 2.11 autopilot. I have flashed a simple program in order to make LED 1 and LED 2 blink: ================================================================= #define LED_1_PIN 10 #define LED_2_PIN 11 //#define GPS_RESET_PIN 21 #define IODIR IODIR ## 0 #define IOCLR IOCLR ## 0 #define IOSET IOSET ## 0 /************************************* ** Main Function main() *************************************/ int main (void) { uint8_t *msg = "Il programma funziona: main"; // TargetResetInit(); // This target board reset seems to be useful for a stable measure (review!!!) init_PLL(); init_VIC(); init_timer(); enable_timer( 0 ); IODIR |= (1<<LED_2_PIN) | (1<<LED_1_PIN); /* PIN defined as Outputs */ IOCLR = (1<<LED_2_PIN) | (1<<LED_1_PIN); while(1) { /* LED 1 and 2 Blinking */ if ( timer_counter > 100 ) { IOSET = 1 << LED_2_PIN; IOCLR = 1 << LED_1_PIN; if ( timer_counter > 200 ) { timer_counter = 0; } } else { IOSET = 1 << LED_1_PIN; IOCLR = 1 << LED_2_PIN; } } /* end while(1)*/ return 0; } ================================================================= There are no peripherals connected to the autopilot and it is powered by a 9V battery. The code starts working when switching on the autopilot, but after few seconds the code hangs up and the leds stop blinking. Do you have an idea? Does the problem come from GPS signal? Thanks Mario Windows Live Messenger Non frenare la tua voglia di comunicare, prova Messenger! |
[Prev in Thread] | Current Thread | [Next in Thread] |