Part Number: EVMK2H
Tool/software: TI-RTOS
Hi,
I am having one K2EVM-HK and using TI RTOS on it. I am working on USB driver in device mode. The board uses dwc3 USB controller.
I have registered one ISR for USB_INT00 (USB Event Ring 0 interrupt). The ISR gets triggered when I connect the board to a host and get proper events. Once all the events are processed, the ISR is getting invoked continuously even though there are no events.
I read IRQ_STATUS_MAIN register and get the value as 0 indicating no event pending. I also checked GEVNTCOUNT register where again I see the value as 0 meaning there are no events.
Following is the code flow of my ISR
/* disable interrupt */
HW_WR_REG32(IRQ_ENABLE_CLR_MAIN(0), 0x1U);
/* read the value of main interrupt status */
uint32_t regVal = HW_RD_REG32(IRQ_STATUS_MAIN(0x0U));
/* Call device interrupt handler */
USBDwcDcdIntrHandler();
/* Clear the interrupt which occured */
HW_WR_REG32(IRQ_STATUS_MAIN(0x0U), regVal);
/* enable IRQ again */
HW_WR_REG32(IRQ_ENABLE_SET_MAIN(0), 0x1U);
/* end of IRQ */
HW_WR_REG32(IRQ_EOI_MAIN, 0x1U);
I have verified this behavior on K2G board as well where the USB driver comes as a part of PDK.