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.

RTOS/66AK2G12: USB FIFO configurations

Part Number: 66AK2G12

Tool/software: TI-RTOS

Hello,

My customer would like to confirm the USB FIFO configuration in PDK implementation.

Please take a look at C:\ti\pdk_k2g_<latest version>\packages\ti\drv\usb\src\dwc\usb_dwc_dcd.c

void usbDwcDcdSetConfiguration(usbDwcDcdDevice_t *dwc3)
{
    uint32_t bulkInFifoSize, ep0CtrlMps, epBulkMps;
    volatile uint32_t regVal;

    tDeviceInfo*        ptDeviceInfo;

    /* This has to be done based on the speed */
    /* Check this logic */
    bulkInFifoSize = ((2U * (1024U + 8U) + 8U) / 8U);
    ep0CtrlMps = 64U;
    epBulkMps = 512U;

 

Here, it seems like the FIFO size hard-corded by ((2U * (1024U + 8U) + 8U) / 8U). And bulkInFifoSize will be used to configure USB related registers.

    regVal = HW_RD_REG32(dwc3->baseAddr + DWC_USB_GTXFIFOSIZ1);
    HW_SET_FIELD(regVal, DWC_USB_GTXFIFOSIZ0_TXFSTADDR, 66U);
    HW_SET_FIELD(regVal, DWC_USB_GTXFIFOSIZ0_TXFDEP, bulkInFifoSize);
    HW_WR_REG32(dwc3->baseAddr + DWC_USB_GTXFIFOSIZ1, regVal);

    regVal = HW_RD_REG32(dwc3->baseAddr + DWC_USB_GTXFIFOSIZ2);
    HW_SET_FIELD(regVal, DWC_USB_GTXFIFOSIZ0_TXFSTADDR, 66U + 256U);
    HW_SET_FIELD(regVal, DWC_USB_GTXFIFOSIZ0_TXFDEP, bulkInFifoSize);
    HW_WR_REG32(dwc3->baseAddr + DWC_USB_GTXFIFOSIZ2, regVal);

Considering the macro definitions, these registers would be :

  • 0x0269C304U and 0x0269C308U for USB0
  • 0x0259C304U and 0x0259C308U for USB1

I don`t know whether these are TI specific registers or USB IP Core registers. Can you comment ?

Some background:

They had a trouble with USB Audio and MSC composite operation with their USB driver code, which is based on TI PDK example. The driver worked basically, but sometimes, something error raised in runtime. And if they changed the FIFO size configuration (bulkInFifoSize in TI driver code), it seemed the error did not happen. So they want to know the reason for that.

As you see in the original post, I understand that there is no USB related information in TRM. And we need NDA with USB IP vendor for further information. As for TI wrapper registers, I understand these should be exactly same configuration with TI examples (Ex. PDK or Linux driver implementation). Unfortunately, my customer does not have NDA for now. They are finding right parson to have NDA with IP vendor to get the IP document and understand why the error does not happen by changing the above registers. But, you know, these registers might be TI related registers. So I`m asking if the above registers are TI part or IP vendor part.

Best Regards,
NK

  • Hi Naoki,

    The USB registers are not presented in the publicly available documentation. There is a note about this in the TRM:
       NOTE:Details on the registers found in the USB subsystem are not provided in this document.The existing Linux or RTOS drivers should be used for proper USB operation.For those who do wish to substantially modify the existing Linux or RTOS USB driver(s), or create new drivers, contact your TI sales representative for more information on how to obtain the third party documentation under NDA.

    You should contact the Support Center with this question:
     

    Best Regards,
    Yordan