Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32S2 does not properly reset on microcontroller.reset() #3750

Closed
Neradoc opened this issue Nov 24, 2020 · 6 comments
Closed

ESP32S2 does not properly reset on microcontroller.reset() #3750

Neradoc opened this issue Nov 24, 2020 · 6 comments
Assignees
Labels
bug espressif applies to multiple Espressif chips
Milestone

Comments

@Neradoc
Copy link

Neradoc commented Nov 24, 2020

On the ESP32S2 port, microcontroller.reset() makes the REPL unresponsive and does seemingly nothing else. The drive remains available. Pressing the reset button is necessary to recover.

@dhalbert dhalbert self-assigned this Nov 24, 2020
@dhalbert
Copy link
Collaborator

I can check on this as part of the sleep/alarm work.

@hierophect
Copy link
Collaborator

Is it possible that this is being overzealous about resetting modules, and is messing with pins related to the REPL?

@tannewt tannewt added bug espressif applies to multiple Espressif chips labels Nov 24, 2020
@tannewt
Copy link
Member

tannewt commented Nov 24, 2020

The REPL pins are USB pins. The drive wouldn't work if USB was broken.

@tannewt tannewt added this to the 6.1.0 milestone Nov 24, 2020
@microdev1
Copy link
Collaborator

Is this implemented? REPL unresponsive can be explained by infinite loop in common_hal_mcu_reset().

I think following should do. The reset reason in this case is ESP_RST_SW. Should I make a PR?

void common_hal_mcu_reset(void) {
    filesystem_flush(); //TODO: implement as part of flash improvements
    esp_restart();
}

@dhalbert
Copy link
Collaborator

dhalbert commented Dec 8, 2020

I think following should do. The reset reason in this case is ESP_RST_SW. Should I make a PR?

Sure, go ahead, thanks! I forgot to do this before handing the sleep code back to @tannewt.

@dhalbert
Copy link
Collaborator

Fixed by #3804. Thanks @microdev1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug espressif applies to multiple Espressif chips
Projects
None yet
Development

No branches or pull requests

5 participants