Skip to content

Clarification on what functions map to what modes #18

@Eqqman

Description

@Eqqman

The STM32L071 has 5 low-power modes: Low-power Run, Sleep, Low-power Sleep, Stop, and Standby. The STM32LowPower library only has 4 modes: Idle, Sleep, DeepSleep, and Shutdown. The code's comments are not consistent in describing what STM mode corresponds to what library mode, leading to confusion on which should be used. I had thought I had found bugs in the library code until I realized it was the comments that were incorrect which had led me to invoke the wrong functions.

In STM32LowPower.cpp:

Line 63 says that Idle = STM Sleep
Line 77 says that Sleep = STM Sleep, conflicting with Idle
Line 91 says that DeepSleep = STM Stop
Line 105 says that Shutdown = STM Standby

Line 128 says that Idle = STM Sleep and Sleep = STM Stop, conflicting with the prior description of Stop
Line 131 says that DeepSleep = STM Standby, which conflicts with the prior description of DeepSleep

If the comments could be revised to clarify these issues it would be appreciated. Note that none of these descriptions claim to invoke Low-power Run or Low-Power sleep, so these descriptions link 4 Arduino functions to only 3 of the 5 STM low-power functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions