Hello EmGa_3347101 ,
The interrupt is being continuously called because the host issues SOF packets at a nominal rate of once every 1 ms for a full-speed bus.
The ISR is thus being continuously called.
In the case of PSoC 5LP if you send a device to Sleep mode then the device wakes up when host drives resume on the bus (i.e. when host drives the USB D Plus line from high to low). To send a USB device to device to sleep it is required that the host does not send the device anything for 3 ms. This usually happens when you place the PC in sleep mode (or hibernate).
Can you please let me know how are you sending the device to sleep?
Is it possible to detect USB D+ state changes?
Please, tell me how. It would be very hopefull for me to know if my device is connected to an USB power charger or to a Host.
You can use USBFS_Dp_Read(); function to know the current state of D+ pin. You can keep a track of the function return values in order to detect if the state of D+ pin changes.
In case of PSoC 5LP, PRT15_PS(0x400051F1) register is used to store the DP and the DM pins.
For more details refer to the page 399 of PSoC 5LP register TRM: https://www.cypress.com/file/136211/download