This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ez430 uart baud rate setting

Hi,

I am working with the ez430-rf2500 with the msp USB programmer.  I want to change the uart baud rate to be 115200 but when I use hyperterm to connect to the usb com port, i don't get the correct output. 

Is he USB -serial baud rate limited?

 

When I use the target board and connect the uart serial output to a logicport, I was able to see the correct baud rate but the data is incorrect.

Could someone advise me on my uart code?

Uart code:

P3SEL |=0x30;

UCA0CTL1=UCSSEL_2;  //8MHz SMCLK

UCA0BR0=0x45;

UCA0BR1=0x00;

UCA0MCTL=UCBRS2+UCBRS0;  

UCA0CTL1 &=UCSWST;

IE2 |=UCA0RXIE;

  • Ben said:
    I was able to see the correct baud rate but the data is incorrect.

    What is a 'correct baudrate'? It must be below +-5% tolerance or you'll get parity errors or framing errors. And this is for both, sender and receiver together. How stable and precise is your SMCLK?

    The maximum BITCLK is 1MHz and the minimum BRCLK is *2of it (BR0 divider is 2) in normal mode and *16 (implicit divider) in oversampling mode.

    I don't know about the USB/serial interface, but on my 5438 with a real serial connection, I have no problems with up to 4 lines with 115200Bd each. With HyperTerm.
    I source the USCI with 1MHz SMCLK derived from an FLL stabilized 16MHz DCO.

  • hi, you cannot get more than 9600bps using the usb stick provided with the ez430 development tool. If you want to speed up communication you need to design your own usb interface. 

    Gian  

**Attention** This is a public forum