libretiny-eu / libretiny

PlatformIO development platform for IoT modules
http://docs.libretiny.eu/
MIT License
382 stars 55 forks source link

Allow configuring GOPIO wake-up pins as floating during deep sleep #275

Open devgs opened 3 months ago

devgs commented 3 months ago

According to guide gpio_stay_*_map are specifically there to prevent pulling pins to a specific level and let them float during deep sleep.

https://docs.bekencorp.com/sdk_3.0.x/bk7238/build/en/latest/developer-guide/power_save/sleep_test.html

This allows any external low-power circuitry to change a pin level, as required, to trigger the wake up.

This requires changes in BDK and was implemented via fixup. Also, exposed gpio_stay_lo_map parameter via lt_deep_sleep_keep_floating_gpio to manage this configuration for pins in range P0-P31.