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.

5535 use as MSD COUNT0 // RXCOUNT first two bytes lost!

Hi all.

I use the 5535 as msd. EP1 for in and out.

EP0 works fine, the enumaration is done.

Now follows the INQUIRY request (31 Bytes) the first time the Count0 register shows me the 0x1F (31)

I receive the data and send the answer (36 Byte) + (13 Byte csw) that works.

Now the Windows driver repeated the same commando.

But the second time its 0x1D (29) // COUNT0 and RXCOUNT is 0x1D, on analyzer I see that the usb send 31 bytes.

What can be my problem???

Code:

if (USB_isValidDataInFifoOut(&pContext->pEpStatus[CSL_USB_EP1]))
    {
        // get the EP1 handle
        tempEpH = USB_epNumToHandle(CSL_USB0, CSL_USB_EP1);
        usb_income_num_bytes = USB_getDataCountReadFromFifo( tempEpH );
    }

    USB_postTransaction(hEpObjArray[2], usb_income_num_bytes,  usbDataBuffer, CSL_USB_OUT_TRANSFER);
    // (hEpObjArray[2] is define as EP1 OUT 512 BULK)


    // Service the RXPKTRDY after reading the FIFO
    USB_clearEpRxPktRdy(CSL_USB_EP1);

The data in analyser:

Thx for your help!

Regards

Sebastian