I think this explanation is still a mix of relevant use cases and corner cases and exceptions all mangled into one. I suggest to 1) explain the relevant use case (deepsleep), then 2) give a relevant example and 3) now add whatever footnotes are needed. Smt like this:
Get or set the pin hold. This functionality can be used to retain the pin's level during deepsleep. Only pins in the RTC power domain can retain their value through deep sleep or reset. These are: P2, P3, P4, P6, P8, P9, P10, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23
... example with deepsleep
A few points to keep in mind when using the pin hold functionality:
It applies to deepsleep and reset and etc etc wdt
Even after the module starts up again the pin level will still be held until the pin is reconfigured. However, this state is not preserved in Micropython, so pin.hold() will return False, even though the pin is actually still held.
When a pin is in hold state, its value cannot be changed by using Pin.value() or Pin.toggle(), until the hold is released.
I think this explanation is still a mix of relevant use cases and corner cases and exceptions all mangled into one. I suggest to 1) explain the relevant use case (deepsleep), then 2) give a relevant example and 3) now add whatever footnotes are needed. Smt like this:
Get or set the pin hold. This functionality can be used to retain the pin's level during deepsleep. Only pins in the RTC power domain can retain their value through deep sleep or reset. These are:
P2, P3, P4, P6, P8, P9, P10, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23
... example with deepsleep
A few points to keep in mind when using the pin hold functionality:
Pin.value()
orPin.toggle()
, until the hold is released.