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.

MSP430G2553: UART transmission issue over higher baudrate(115200)

Part Number: MSP430G2553
Other Parts Discussed in Thread: MSP-FET

hi,

      I am using a MSP430G2553 customized board running it  at 16 MHz(DCO) . i am sending an array of length 92, per second on UART using following segment of code.

void  pheonix_send_data_to_pc(unsigned char * data , unsigned char length)

{

while(length)

{
while (!(IFG2&UCA0TXIFG));
UCA0TXBUF= *data;
data++;

length --;
}

}

sometimes i miss last for or five bytes means instead of 92 only 88 or 87 gets transmitted

sometimes complete frame gets transmitted means start of frame and end of frame gets transmitted but few bytes within last ten didn't get transmitted.

it would be great any one please explain how and why this is happening?

  • Who is receiving data? I don't have any problems with using MSP430G2553 for sending more than 2000 bytes, at once, on 4 Mbps...

    		mov.w #WDTPW + WDTHOLD, &WDTCTL
    
    		mov.b &CALBC1_16MHZ, &BCSCTL1
    		mov.b &CALDCO_16MHZ, &DCOCTL
            
    		bis.b #UCSWRST, &UCA0CTL1
    
    		bis.b #(BIT5 + BIT4), &P3SEL	; P3.4/P3.5 = TXD/RXD
    		bis.b #UCSSEL_2, &UCA0CTL1	; SMCLK
    
    		; 16000000 Hz  4000000 bps
    		mov.b #004h, &UCA0BR0
    		mov.b #000h, &UCA0BR1
    		bis.b #(UCBRS_0 + UCBRF_0), &UCA0MCTL
    
    		bic.b #UCSWRST, &UCA0CTL1
    
    		mov.w #70, R14
    		mov.b #32, R15
    		
    Loop		bit.b #UCA0TXIFG, &IFG2
    		jnc Loop
    		mov.b R15, &UCA0TXBUF
    		
    		add.b #1, R15
    		cmp.b #127, R15
    		jne Loop
    		
    		mov.b #32, R15
    		sub.w #1, R14
    		jnz Loop


  • first of all thanks for such a quick reply and i apologize for not being specific.
    i am communicating at 115200 baudrate and i am simply sending data to my PC while monitoring it in hyper terminal i noticed that sometimes i miss few bytes and some time complete frame doesn't get transmitted
  • sasuke uchiha said:
    first of all thanks for such a quick reply and i apologize for not being specific.
    i am communicating at 115200 baudrate and i am simply sending data to my PC while monitoring it in hyper terminal i noticed that sometimes i miss few bytes and some time complete frame doesn't get transmitted

    By question "Who is receiving data" I was not thinking on PC. What is between MSP430G2 and PC? If MSP-FET bridge is used, than transfer on some baudrates is not guaranteed.

  • no mam,
    i am using USB to UART bridge (MSP FET is not in picture) in between MSP430G2 and my PC. 

  • I guess that new transfer of 92 bytes is started before finishing old one. Or length/data is/are changed by ISR during UART transmission.

**Attention** This is a public forum