From ef4993a7a6271e2ab58a119347f601b9ffe8e692 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 18 May 2021 17:37:21 -0700 Subject: [PATCH 1/2] Fix safe mode on rp2040 --- ports/raspberrypi/supervisor/port.c | 6 +++--- supervisor/shared/safe_mode.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 9b3e140a85..443cfc2715 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -196,13 +196,13 @@ uint32_t *port_heap_get_top(void) { return port_stack_get_top(); } +extern uint32_t __scratch_x_start__; void port_set_saved_word(uint32_t value) { - // NOTE: This doesn't survive pressing the reset button (aka toggling RUN). - watchdog_hw->scratch[0] = value; + __scratch_x_start__ = value; } uint32_t port_get_saved_word(void) { - return watchdog_hw->scratch[0]; + return __scratch_x_start__; } uint64_t port_get_raw_ticks(uint8_t *subticks) { diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index e8778216a6..fabcbbffa5 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -78,7 +78,7 @@ safe_mode_t wait_for_safe_mode_reset(void) { #endif uint64_t start_ticks = supervisor_ticks_ms64(); uint64_t diff = 0; - while (diff < 700) { + while (diff < 1000) { #ifdef MICROPY_HW_LED_STATUS // Blink on for 100, off for 100, on for 100, off for 100 and on for 200 common_hal_digitalio_digitalinout_set_value(&status_led, diff > 100 && diff / 100 != 2 && diff / 100 != 4); From 6d6089f4c24b762a7655ea13529eb7a04f0b85d9 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 18 May 2021 22:33:29 -0400 Subject: [PATCH 2/2] bump xtensa cache id --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da952a9e04..a4238ce406 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -482,7 +482,7 @@ jobs: id: idf-cache with: path: ${{ github.workspace }}/.idf_tools - key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210422 + key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210518 - name: Clone IDF submodules run: | (cd $IDF_PATH && git submodule update --init)