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.

Help! Problem Transmitting Data with UART Mode MSP430F2252

Other Parts Discussed in Thread: MSP430F2252

  I used Code Composer Studio V4 to write a simple code for MSP430F2252. All UART settings are standard and basic. It can transmit data -- but: It only transmits the first and the third byte when the baud rate is set to 19200. All the other sequential bytes transmitted were lost. After some tests, it seems that the problem is equivalent to that TX interrupt flat and busy flag are both signaling TX buffer not busy while transmitting data (still busy). Are those MCU defective? Please help!  

  • Hi,

        i too faced the same problem and is rectified by simply using  while(!(IFG1 & UTXIFG0)); after TXBUF0.

    i.e.,

    TXBUF0='required byte to be push';

    while(!(IFG1 & UTXIFG0));               //wait i\until Tx over

     

    might be this will eliminate ur problem

    Regards

    Kshatriya

  • When you run the msp430x22x4_uscia0_uart_01_19200.c   example from this zip file, do you see the same issue?

  •   Thank you for the precise answer. Now I can more characterize my problem better:

      The MSP430F2252 Tx interrupt was triggered before the UCA0TXBUF was ready to load more data, that causes lost of the subsequent data to UCA0TXBUF if data is loaded immediately by using next Tx interrupt. I was using an external circular buffer to do automatic loading triggered by Tx interrupt.

      Now I know there is a bud in MSP430F2252, the MSP430F2252 Tx interrupt is not a reliable indicator of UCA0TXBUF ready. I am going to get over with it (by giving up my once proud automatic Tx circular buffer and) by just waiting like your suggestion.

    while (!(IFG2 & UCA0TXIFG));              // USCI_A0 TX buffer ready? 

     

**Attention** This is a public forum