Skip to content

[Bug]: nrf52 boards are not entering deep sleep when battery is critically low (make system_off mode work on nrf52) #4378

Description

@geeksville

Category

Hardware Compatibility

Hardware

All nrf52 boards

Firmware Version

master (private build)

Description

I just happened upon this code in Power.cpp:

#ifdef ARCH_NRF52
                // We can't trigger deep sleep on NRF52, it's freezing the board
                LOG_DEBUG("Low voltage detected, but not triggering deep sleep\n");
#else
                LOG_INFO("Low voltage detected, triggering deep sleep\n");
                powerFSM.trigger(EVENT_LOW_BATTERY);
#endif

Freezing boards is bad, but IMO it is super important to enter deep sleep anytime we are able to detect that the battery is critically low. Because to not do this will kill lipos.

I'm happy to look into this as I continue my adventure of improving nrf52 power consumtion. But opening an issue in case any of ya'll have comments on this theory?

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghardware-supportHardware related: new devices or modules, problems specific to hardwaretriagedReviewed by the team, has enough information and ready to work on now.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions