Question
STM32F4 add endpoint to USB
Posted on June 10, 2016 at 11:52
I'm doing a project where I use a NUCLEO-F446ZE as a USB device.
I'm implementing the CCID class. I used the template class and some code from VCP. This way some endpoint are already configured like Bulk in and out. Now I want to add Interrupt IN because it's used to tell the host if there is any change (like card insertion/removal). I added this in my class file in the init function#define CCID_INTR_IN_EP 82
#define CCID_INTR_EP_MAX_PACKET 4
USBD_LL_OpenEP(pdev,
CCID_INTR_IN_EP,
USBD_EP_TYPE_INTR,
CCID_INTR_EP_MAX_PACKET);
and this to usb_conf.c in the USBD_LL_Init() function
HAL_PCDEx_SetTxFiFo(&hpcd, 2, 0x40);
But it doesn't work, the host receive nothing and the USB register aren't configured
#stm32f4-nucleo-hal #ccid #device #usb