Skip to content

supervisor.RunReason is unexpectedly AUTO_RELOAD on newer beta-2 builds #3858

Closed
@anecdata

Description

@anecdata

I may be doing something wrong or misinterpreting, but supervisor.RunReason isn't acting as I expect.

FeatherS2 with ESP32S2:

6.1.0-beta.2-124-gfd21ff59d on 2020-12-18

import time
import supervisor

time.sleep(5)
print(supervisor.runtime.run_reason)
supervisor.reload()

repeatedly gives

soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
supervisor.RunReason.AUTO_RELOAD

but expected supervisor.RunReason.SUPERVISOR_RELOAD

Also get AUTO_RELOAD by typing CTRL-D in the REPL (expected REPL_RELOAD)

Pressing the reset button on the Feather S2 gives

microcontroller.ResetReason.POWER_ON
supervisor.RunReason.AUTO_RELOAD

expected STARTUP

PyPortal:

seemed to work on older beta code:
6.1.0-beta.2 on 2020-12-03
adafruit-circuitpython-bundle-6.x-mpy-20201203

alarm.ResetReason.UNKNOWN
supervisor.RunReason.STARTUP

but now:
6.1.0-beta.2-124-gfd21ff59d on 2020-12-18
adafruit-circuitpython-bundle-6.x-mpy-20201220

microcontroller.ResetReason.UNKNOWN
supervisor.RunReason.AUTO_RELOAD

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugespressifapplies to multiple Espressif chipspower

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions