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: [email protected]
[mailto:[email protected]] On Behalf Of Harry
Lemmens
Sent: Thursday, June 26, 2003 11:11 PM
To: [email protected]
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

[email protected]




-----Original Message-----
From: [email protected]
[mailto:[email protected]]on Behalf Of helick
Sent: Friday, June 27, 2003 12:34 PM
To: [email protected]
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 |= BIT4;
    P3SEL |= BIT4;              // Select pins to alternate function

    //clock setup
    BCSCTL1 |= 0x04;            //enable xtl2
    _BIC_SR(OSCOFF);
    do
    {
        IFG1 &= ~OFIFG;
        for(i = 255; i > 0; i--) __asm__ __volatile__("; loop");
    }
    while ((OFIFG & IFG1) != 0);
    BCSCTL2 = 0x88;

    //INITIALIZE serial port 0
    UCTL0 = CHAR | SWRST;       // 8 bit chars - leave in reset mode
    UTCTL0 = 0x20;              // uclk = smclk
    UBR10 = 0x01;               // 3.6864MHz/9600bps = 384 = 0x180
    UBR00 = 0x80;
    UMCTL0 = 0x00;
    ME1 |= UTXE0;               // Enable Tx0
    UCTL0 = CHAR;               // 8 bit chars - take out of reset

    IE1 |= 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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Reply via email to