Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wakeup Computer from S3 Suspend #47

Closed
camrbuss opened this issue Feb 17, 2021 · 4 comments
Closed

Wakeup Computer from S3 Suspend #47

camrbuss opened this issue Feb 17, 2021 · 4 comments
Labels
question Further information is requested

Comments

@camrbuss
Copy link
Contributor

I am having difficulty getting my keyboard to wakeup my computer from an S3 suspend.

I am running Linux Kernel 5.10 and have a custom STM32F072 keyboard and can enter sleep with the MediaSleep keycode, but cannot seem to wake my computer with a button press. QMK on the same keyboard does wake up my machine, so I do not believe it is a hardware issue. I also tested with the Keyseebee firmware after just changing the pins, and still was unable to wake my machine.

Has anyone else had this issue? I looked into the stm32-usbd repository for suspend and resume but am not sure if those are even the correct functions to call.

BTW amazing library! I love the new CustomAction functionality for entering DFU.

@TeXitoi
Copy link
Owner

TeXitoi commented Feb 17, 2021

Sorry no idea. But I doubt that stm32-usbd suspend and resume are related, I think they are for usb protocol suspend/resume.

@TeXitoi TeXitoi added the question Further information is requested label Feb 17, 2021
@camrbuss
Copy link
Contributor Author

I looked into QMK and it seems that it calls usb_lld_wakeup_host from chibios which sets the CNTR register with the RESUME bit for 2 milliseconds (USB standard states 1ms-15ms) and then clears the bit.

As you mentioned, this is not what the stm32-usbd resume or suspend is doing as that has to do with the LP_MODE bit, which I believe has more to do with the device than the host.

I am thinking this should be a part of stm32-usbd and not keyberon. Should I open an issue there?

What are other keyberon users doing to wake their computer from suspend? Power button?

@TeXitoi
Copy link
Owner

TeXitoi commented Feb 22, 2021

If that's dedicated register access, yes it should go in stm32-usbd.

I personally use a laptop, so opening lid wake up the computer.

@camrbuss
Copy link
Contributor Author

Created stm32-usbd issue to capture this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants