Can't read data from device to PC on USB interface 1
I've setup a custom USB device with multiple interfaces on custom hardware using a ULPI. The USB code is derived from the code generated by CubeMX.
- On interface 0 I have endpoint 1 in and out
- On interface 1 I have endpoint 2 in and out
- On interface 2 I have endpoint 3 in and out
From the PC, I wrote a very simple program that can send and receive a single packet. I can send and receive data on interface 0 (ep1). I can also send data from PC to device to on interface 1 (ep2), but I cannot receive data. Interface 2 has not yet been implemented. Transmit and receive buffers are set as follows in usbd_conf.c:
HAL_PCDEx_SetRxFiFo(&hpcd_USB_OTG_HS, 0x200);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_HS, 0, 0x20);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_HS, 1, 0x80);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_HS, 2, 0x80);
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_HS, 3, 0x80);
In my custom device class I open all three pairs of EP's exactly the same way. I'm missing something though. My presumption is that everything will go through the interrupt handler (OTG_HS_IRQHandler). If I toggle a DIO there, it fires off multiple times during enumeration, then every time I read from interface 0. When I read from interface 1, the interrupt doesn't fire. Is there an interrupt configuration that I'm missing a setup on for interface 1? I've been at this for a couple days so any suggestions would be welcome! Thanks!
