From: Mark S. <m.s...@ie...> - 2003-06-27 12:40:51
|
Have you tried simplifying your design by using the 32k crystal and the FLL that is usually used? It would verify that the system works. Granted, you'd only be able to get about 9600 baud, but it would verify everything past the crystal. There are numerous examples of this available. As for GDB, I have found gdb to be very unstable when asked to debug a project that has a fast recurring IRQ. For instance, I can't debug more than a few lines before the multiple Timer_A IRQ's cause gdb to "loose sight" of what's happening (say, something like 2khz on Timer_A IRQ). Regards -Mark -----Original Message----- From: msp...@li... [mailto:msp...@li...] On Behalf Of Harry Lemmens Sent: Thursday, June 26, 2003 11:11 PM To: msp...@li... Subject: RE: [Mspgcc-users] more on clock source and UART Try putting the for(i... ) Loop around the crystal osc "do" loop and test. The osc starts up, but stops as it is bouncing by the time you try to switch to it, it has failed. This subject has been covered in just the last week, so look back over the archive ... Cheers Harry Home Phone(03) 9504 1957 Mobile 0419 154 602 hle...@op... -----Original Message----- From: msp...@li... [mailto:msp...@li...]On Behalf Of helick Sent: Friday, June 27, 2003 12:34 PM To: msp...@li... Subject: [Mspgcc-users] more on clock source and UART Hello again, I am still having trouble with the serial communication portion of my code. From reading previous posts I composed the code bellow, which seems to be correct, but the msp430f149 seems to have some peculiarities, so I am not completely sure. The code will hang on the clock initialization on both insight/gdb and just running the thing on it's own power...I am pretty much out of ideas. Please point out anything that might be wrong with this thing. Thank you in advance. helio -------- void setup (void) { unsigned int i; //port/pin setup for the specialCOMM P3DIR |=3D BIT4; P3SEL |=3D BIT4; // Select pins to alternate function //clock setup BCSCTL1 |=3D 0x04; //enable xtl2 _BIC_SR(OSCOFF); do { IFG1 &=3D ~OFIFG; for(i =3D 255; i > 0; i--) __asm__ __volatile__("; loop"); } while ((OFIFG & IFG1) !=3D 0); BCSCTL2 =3D 0x88; //INITIALIZE serial port 0 UCTL0 =3D CHAR | SWRST; // 8 bit chars - leave in reset mode UTCTL0 =3D 0x20; // uclk =3D smclk UBR10 =3D 0x01; // 3.6864MHz/9600bps =3D 384 =3D 0x180 UBR00 =3D 0x80; UMCTL0 =3D 0x00; ME1 |=3D UTXE0; // Enable Tx0 UCTL0 =3D CHAR; // 8 bit chars - take out of reset IE1 |=3D UTXIE0; //enable Tx0 interrupt eint(); } ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Mspgcc-users mailing list Msp...@li... https://lists.sourceforge.net/lists/listinfo/mspgcc-users ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Mspgcc-users mailing list Msp...@li... https://lists.sourceforge.net/lists/listinfo/mspgcc-users |