Noted the GPIO_Init, GPIO_PinAFConfig functions don't do anything. The USB hardware automatically takes over the GPIOs. Helas, it sets the suspended voltages but does not enable communication. The GPIO initialization is still required for communication.
The USB_OTG_MODIFY_REG32 function doesn't do anything. You have to mangle the bits manually.
A few days of randomly poking registers, perusing random STM32Cube firmware & perusing the datasheet finally got it to release the GPIO's & give the wakeup signal. Moreover, it can restart USB from this state, eliminating the need to reset & set both pins to 0. If it ever resets & sets the pins to 0, the host won't detect the wakeup signal.
This got it to properly wake the host up.
Method of probing the suspended & wakeup signals with a dummy USB port, since it would always crash the laptop.
Testing suspend with the laptop instead of the development machine.
Test points for probing wakeup signals with the laptop.
With that, LEDs & an enclosure were next, along with more comparison with the Sunsonny.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.