Enabling of USB device Insert/Remove interrupt to the Host Port Interface (HPI)

Question: How do I get a Insert/Remove event to send an interrupt to the HPI interface when operating in co-processor mode?



The best resource for co-processor based questions can be found in Cypress' Linux driver. The Linux driver can be found in the C:\Cypress\USB\OTG-Host\Source\coprocessor\linux\drivers\usb\cy7c67300 directory after the CY3663 - EZ-OTG / EZ-Host Development Kit has been installed on your system. The Insert/Remove interrupt code can be found in the hcd_irq_resumeX function found in cy7C67200_300_hcd.c. cy7C67200_300_lcd.c contains the code that enables the required registers. Basically what needs to happen is that the Host/Device n Interrupt Enable register will need to have the correct hardware interrupts enabled, the Host n Interrupt Enable Register for Portx Connect Change Int En will need to be configured correctly and the HPI routing register must be configured correctly to route the interrupt to the HPI_INT hardware pin.