2019-11-08 12:04 AM
Hello,
I'm currently developing a USB Host library with support for multiple interfaces on the same device. To be more clear, I have one device connected with 3 different CDC interfaces available and i need to use all of them simultaneously.
At the moment I'm facing a problem with the FIFOs that the USB scheduler uses. When I have all the interfaces open, I get an incorrect value in OTG_HS_HNPTXSTS, precisely the value of the space available in the non periodic TX FIFO (NPTXFSAV) exceed the acceptable value. It's a Read-Only register and i can't find any hint of how it breaks. I already checked twice mi FIFO dimensions settings and they seems to be good.
USBx->GRXFSIZ = 0x180U;
USBx->DIEPTXF0_HNPTXFSIZ = (uint32_t)(((0x1A0U << 16) & USB_OTG_NPTXFD) | 0x180U);
USBx->HPTXFSIZ = (uint32_t)(((0xE0U << 16) & USB_OTG_HPTXFSIZ_PTXFD) | 0x320U);
Any idea is welcome!
2019-11-08 01:18 AM
> (NPTXFSAV) exceed the acceptable value
How, exactly?
Is this immediately after configuration of the xxxSIZ registers?
JW
2019-11-08 01:37 AM
Hello! Thank you for your answer.
I set the FIFO size to 0x1A0, but when the host stop working values in the register NPTXFSAV are superior to this limit, like 0x5xx, values that are also superior to the dimension of the total FIFO RAM. This happens while transmitting BULK data. Initially, after the configuration, the values are correct.