Skip to content

microcontroller.reset() to bootloader on esp32-s2 #3884

Closed

Description

@FoamyGuy

Running these commands in REPL my device is rebooting into standard mode coming up as a CIRCUITPY drive.

import microcontroller
microcontroller.on_next_reset(microcontroller.RunMode.BOOTLOADER)
microcontroller.reset()

Tested on:

Adafruit CircuitPython 6.1.0-beta.2-182-g1b7fbaf31 on 2020-12-26; Adafruit MagTag with ESP32S2

and

Adafruit CircuitPython 6.1.0-beta.2-30-g6cced4940 on 2020-12-13; FeatherS2 with ESP32S2

I have previously followed the process to have UF2 combo bootloader on my devices.

Activity

  1. microdev1 commented on Dec 27, 2020

    @microdev1
    Collaborator

    microcontroller.RunMode.BOOTLOADER isn't implemented on the esp32s2.

    void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
    if(runmode == RUNMODE_SAFE_MODE)
    safe_mode_on_next_reset(PROGRAMMATIC_SAFE_MODE);
    }

    I don't think it is possible to enter DFU (first-stage) bootloader on esp32s2 from software.
    I tried to get reset to UF2 bootloader working but I am facing a strange issue #3813.

  2. ladyada commented on Dec 27, 2020

    @ladyada
    Member

    there is some way to enter the DFU bootloader from usercode because arduino does it...
    @me-no-dev do you have any hints we could use to implement? :)

  3. me-no-dev commented on Dec 28, 2020

    @me-no-dev
  4. microdev1 commented on Dec 28, 2020

    @microdev1
    Collaborator

    Thanks! @me-no-dev, this works... the changes are in my update-run-mode branch. :)

  5. added this to the 6.x.x - Bug Fixes milestone on Dec 28, 2020
  6. dhalbert commented on Mar 31, 2021

    @dhalbert
    Collaborator

    Thanks! @me-no-dev, this works... the changes are in my update-run-mode branch. :)

    @microdev1 Could you make your changes into a PR?

  7. microdev1 commented on Apr 1, 2021

    @microdev1
    Collaborator

    @microdev1 Could you make your changes into a PR?

    This is stuck due to [email protected]. In my implementation, the function calls used to achieve this are part of [email protected].

  8. ThomasAtBBTF commented on Apr 16, 2021

    @ThomasAtBBTF

    I just want to point out, that I am very interested that this feature will work in the not to distance future,

  9. dhalbert commented on Jul 19, 2021

    @dhalbert
    Collaborator

    This should be fixed now, with the latest merge, and also with the latest TinyUF2. Update your TinyUF2 bootloader to at least 0.5.0, following the instructions here: https://learn.adafruit.com/adafruit-magtag/install-uf2-bootloader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugespressifapplies to multiple Espressif chips

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions