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.

MSP430I2041 - Getting junk data over UART

Other Parts Discussed in Thread: MSP430I2041, MSP430WARE

Hi,

We are using MSP430i2041 for our application and we are trying to send characters over UART(9600, 8N1)but getting the junk values over it.

We are using the example available in MSP430ware along with the low_level_init.c added to the code, below is the UART configuration,

P1SEL0 |= BIT2 | BIT3; // P1.2/3 eUSCI_A Function
P1SEL1 &= ~(BIT2 | BIT3);

UCA0CTL1 |= UCSWRST; // Hold eUSCI in reset
UCA0CTL1 |= UCSSEL_2; // SMCLK
UCA0BR0 = 0xAA; // 9600 baud
UCA0BR1 = 0x06;
UCA0MCTLW = 0xD600; // 16.384MHz/9600 = 1706.6667 (See UG)
UCA0CTL1 &= ~UCSWRST; // Release from reset
UCA0IE |= UCRXIE; // Enable RX interrupt

We are not connected the 20Kohm resistor to the Rosc pin does this effect to the accuracy of the clock?? Or does it requires additional configuration??

Best Regards,

Santosh.

  • Hi Santosh!

    I can see you are using exactly the code from

    • msp430i20xx_euscia0_uart_01.c

    right? Well this code was tested and should work, of course. The example does not use the external resistor as well. The DCO frequency is (should be) calibrated. Can you route it to an output pin to measure the exact frequency with an oscilloscope? What does "junk values" mean? Is there one character received for everyone that is sent? Problem in both directions? Are you sure the settings on the PC side are correctly set to 9600 8N1? Did you try to loop the data back on each side?

    Dennis

  • Hi Dennis,

    Junk means if I send character "A" continuously then I get same character at the output but not the "A".
    The PC settings are proper and I tested the communication with other series of MSP430.
    I can check the frequency with an oscilloscope and can confirm you. But still when it is calibrated it shouldn't fail.

    Best Regards,
    Santosh
  • Santosh PG1 said:
    But still when it is calibrated it shouldn't fail.

    Yes, if the calibration data is still present, but I'm not entirely sure how it works on the MSP430i2041 because I have never used one of them, so also this low_level_init.c is new to me. Does it route to a memory location where the calibration data is stored?

    Anyway - I would definitely check the frequency with an oscilloscope first.

    Dennis

**Attention** This is a public forum