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.

MAP_UARTCharGet loses information when receiving to a array. -cc3200

I'm having a really stupid problem. For more info please go here: e2e.ti.com/.../526580


If I do this:

   int i = 0;
    while(1)
    {
    	if(MAP_UARTCharsAvail(COMAPI))
    	{
    		while(MAP_UARTCharsAvail(COMAPI))
    		{
    			ComAPIbuf[i] = MAP_UARTCharGetNonBlocking(COMAPI);
    			i++;
    		}
    		UART_PRINT("%s\n\r", ComAPIbuf);
    		UART_PRINT("i: %d\n\r", i);
    	}
    }

I lose some information received by the UART.

But if a do this:

 

    while(1)
    {
    	if(MAP_UARTCharsAvail(COMAPI))
    	{
    		while(MAP_UARTCharsAvail(COMAPI))
    		{
    			UART_PRINT("%c", MAP_UARTCharGetNonBlocking(COMAPI));
    		}
    	}
    }

It receives all the information comming from UART.

Can anyone give me any idea why?

Thanks