libretiny-eu / libretiny

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

Deep sleep boot reason information is wrong if GPIO rising edge is used #233

Open daniel-dona opened 6 months ago

daniel-dona commented 6 months ago

If only one GPIO is configured as wake source for deep sleep and a rising edge is used, the boot reason is just "power on".

For example, using GPIO15 on CBU module:

lt_deep_sleep_config_gpio((1 << 15), true);

Also found that configuring any other pin as a falling edge fix this, so this is a possible workaround for the moment, ex:

lt_deep_sleep_config_gpio((1 << 15), true);
lt_deep_sleep_config_gpio((1 << 17), false);