zmk icon indicating copy to clipboard operation
zmk copied to clipboard

feat(docs) Adding some additional clarity around low power states

Open nmunnich opened this issue 1 year ago • 6 comments

Minor improvements to resolve some questions that appeared on Discord. Also made a note of the soft-off/deep-sleep wakeup-sources issue, since I couldn't find that documented anywhere.

nmunnich avatar Jun 11 '24 00:06 nmunnich

Upgraded the firmware on my keyboard recently. Ran into an issue where I couldn't wake it from sleep and couldn't figure out why until I saw this PR.

I'm not sure about the soft-off portion of this PR, but I think the comment about wakeup-source on the deep sleep docs is important to have.

nVitius avatar Jun 27 '24 21:06 nVitius

Thanks again Pete for the reply. I have done some larger changes to accommodate. I think this version reads much nicer. Unfortunately a rename was involved which makes reviewing it more difficult.

Essentially, the soft off feature page is renamed to low power states, and the information about idle and deep sleep were moved into it. I also documented how to reuse a key for wakeup-only, and how to make the &soft_off behave like &sleep. Some minor renaming was involved to make things read nicer.

All the content for the direct pin approach is tested and working. The content for the matrix-integrated and switch matrix wakeup-only was working, but currently isn't: see #2376. It may need some changing after said issue is resolved.

nmunnich avatar Jul 16 '24 15:07 nmunnich

Did some reshuffling to try and get the tabs behaving nicely without too much duplication. Since this required shoving a bunch of content into other files, I also did so for some content that doesn't get duplicated because it makes the file overall much easier to read.

The wakeup-only approach is much simplified and should be clearer now, with minor changes to the direct and matrix approaches as a result of the reshuffling.

nmunnich avatar Jul 22 '24 12:07 nmunnich

Made the dts and general replacements.

nmunnich avatar Jul 23 '24 08:07 nmunnich

Did a refactoring of this to make it cleaner (as was discussed previously on Discord). Originally I intended to do the refactor after this is merged, but as it has been slow-going I decided to put in the effort to separate out the content. Should make everything easier to review as well. The "guide" portion is now a separate PR: #2439

I added what information I could to the config section, but it may need double-checking.

nmunnich avatar Aug 24 '24 07:08 nmunnich

Folded the content from #2439 back into this - trying to get it nicely into separate PRs post development reshuffling was annoying me too much.

nmunnich avatar Sep 07 '24 10:09 nmunnich

I am happy with this, thanks again for tackling it. However I'd appreciate if @petejohanson could go over the finished page to confirm whether

* there are any technical correctness issues I missed

* he has any concerns on documenting the wakeup-only approach

All looks reasonable to me. The description of deep sleep is a tad... non-technical, and that may be the intention. If so, looks fine to me. If we want to offer more details on the specifics of the power state of the MCU, RAM retention (or not), etc., I'm not sure if that's best served living on that page or elsewhere.

petejohanson avatar Nov 01 '24 17:11 petejohanson

If we want to offer more details on the specifics of the power state of the MCU, RAM retention (or not), etc., I'm not sure if that's best served living on that page or elsewhere.

This is a good idea. I'll have a go at adding such specifics when I touch this page up a bit again to get it ready for merging.

nmunnich avatar Nov 01 '24 17:11 nmunnich