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.

USB_isValidDataInFifoOut() Issues

Other Parts Discussed in Thread: TMS320C5515

Hi,

We're working on a project that uses the TMS320C5515 and USBwith CSL v3.04.

We have a situation where one of our boards is experiencing an issue with USB.

It has to do with the function USB_isValidDataInFifoOut().

On one board in particular this function is returning false.

Below is a code snippet of the specific area:

// read the RX packet size
// validate the RX packet first
if (USB_isValidDataInFifoOut(&pContext->pEpStatus[CSL_USB_EP2]))
{
	// get the EP2 handle
	tempEpH = USB_epNumToHandle(hUsbDev, CSL_USB_EP2);

	// this size signals to the USB task that a new packet came in
	usb_income_num_bytes_ep2 = USB_getDataCountReadFromFifo(tempEpH);
}
else
{
	invalid_packet_error();
}

Looking at the documentation for this function it states:

"This function checks validity of the data in the output FIFO"

Aside from that, it doesn't specify criteria for what causes the function to return false.

I'm trying to find out the following:

1. What kinds of specific events can cause this function to return false?

2. Is the data from that packet transfer lost, and will not be resent?

3. What types of mechanisms can be used to gracefully recover from the function returning false (if possible), can it just be ignored?

I'm going to be working with the board some more today and will post my results.

Thanks,

Ben

  • Hi Benjamin,

    Could you please let us know on the below questions.

    • What type of USB transfers are you performing ?
    • I understand this is your custom board, is this right ?
    • Is this happening in only one board or multiple?
    • Is this behavior observed consistently ?

    Yes, as you rightly mentioned this function checks the validity of data in the Endpoint FIFO before performing further processing.

    From the issue that you observed , this looks more hardware issue where data is getting lost.  But your further inputs will help.

    Regards

    Vasanth

  • Hi Vasanth,

    What type of USB transfers are you performing ?  The transfers are of type BULK on endpoint 2

    I understand this is your custom board, is this right ?  This is a custom PCB.

    Is this happening in only one board or multiple? Only one board.

    Is this behavior observed consistently ? It is consistent on the one board that has showed the issue.

    With the above supplied answers, it would seem to be a hardware related problem.

    Although, the firmware was loaded onto the board via the TI USB bootloader, which seemingly showed no issues.

    So does this point to the hardware being proper?

    I'll hopefully be doing a debug session with it today if I can get my hands on it to narrow down the problem.

    Thanks,

    Ben