You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The esp32s2 posses a challenge for manual safe mode implementation as it lacks a dedicated reset pin instead the reset button is connected to CHIP_PU which when pulled low turns off the power to the chip thus causing a hard reset.
A solution to this problem as discussed during the deep dive is to use IO0 (boot button) and check its state during CPY startup in order to trigger a soft reboot keeping the ram alive.
I was able to boot into safe mode by pressing the boot button momentarily during 700ms loop which is indicated by a steady yellow color of the rgb led on startup.
As of now I am just returning MANUAL_SAFE_MODE instead of NO_SAFE_MODE in order to enter safe mode and haven't really figured how this will work alongside other CPY ports and how it will soft reboot with status stored in ram.
digitalio_digitalinout_obj_tboot_button;
common_hal_digitalio_digitalinout_construct(&boot_button, MICROPY_HW_BUTTON); //#define MICROPY_HW_BUTTON (&pin_GPIO0) common_hal_digitalio_digitalinout_switch_to_input(&boot_button, PULL_UP);
uint64_tstart_ticks=supervisor_ticks_ms64();
uint64_tdiff=0;
while (diff<700) {
#ifdefMICROPY_HW_LED_STATUS// Blink on for 100, off for 100, on for 100, off for 100 and on for 200common_hal_digitalio_digitalinout_set_value(&status_led, diff>100&&diff / 100!=2&&diff / 100!=4);
#endifif (!common_hal_digitalio_digitalinout_get_value(&boot_button)) {
returnMANUAL_SAFE_MODE;
}
diff=supervisor_ticks_ms64() -start_ticks;
}
The text was updated successfully, but these errors were encountered:
This is a follow-up to 9-9-20 (CPY Day) esp32s2 Deep Dive in which esp32s2
manual safe mode
support was briefly discussed.The esp32s2 posses a challenge for
manual safe mode
implementation as it lacks a dedicated reset pin instead the reset button is connected toCHIP_PU
which when pulled low turns off the power to the chip thus causing ahard reset
.A solution to this problem as discussed during the deep dive is to use
IO0
(boot button) and check its state during CPY startup in order to trigger asoft reboot
keeping the ram alive.I was able to boot into safe mode by pressing the boot button momentarily during 700ms loop which is indicated by a steady yellow color of the rgb led on startup.
As of now I am just returning
MANUAL_SAFE_MODE
instead ofNO_SAFE_MODE
in order to enter safe mode and haven't really figured how this will work alongside other CPY ports and how it will soft reboot with status stored in ram.Code snippet from safe_mode.c .
Tested on microS2.
The text was updated successfully, but these errors were encountered: