USB going into suspended state after 5 seconds and wont exit
I am doing a USB HID project and have followed a lot of the setting up of this YouTube video.
I have set it up to send a string when I press a button. Using Device Monitoring Studio, I can see that when the device is plugged in, it reads the descriptor, checks the PID and VID and responds to the button press and receives the string.
If I leave it for roughly 5 seconds (DMS measured 5.0087 & 5.0013 seconds) then it goes into a suspended state. Once this has happened, any button presses are ignored, and I am unable to get the USB to respond to anything, unless I unplug it and plug it in again. If I do this, it works fine until it is left for another 5 seconds. I have even removed the code inside the HAL_PCD_SuspendCallback in usbd_conf.c to try and stop it getting suspended but it still goes unresponsive.
I'm at a bit of a loss as to what to do now!
