Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 5, 3 & 1

NiVa_3988066
Level 1
Level 1

I need to send ~400 bytes via USB UART, but the following code dosn't help. The processor handed at the "while(USBUART_CDCIsReady() == 0u);" statement.

int i = 0;
while( i < 2 * DATA_LENGTH)
{
    while(USBUART_CDCIsReady() == 0u);
    USBUART_PutData((uint8*)&incomingByte[i/2], 64);
    i += 64;  
}

Note that the incomingByte is actually a uint16 array.

0 Likes
2 Replies
AnkitaS_51
Employee
100 likes received 50 likes received 25 likes received
Employee

Hello,

The processor  may get hanged at the "while(USBUART_CDCIsReady() == 0u);" statement if the previous transfer to the PC is not done or completed.

You need to check the USB log for confirmation of the above mentioned scenario.

400 bytes can be sent through USB UART

Thanks,

Ankita Singh

0 Likes