8000 Merge pull request #4779 from tannewt/fix_sm_rp2040 · domdfcoding/circuitpython@1d39be4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d39be4

Browse files
authored
Merge pull request adafruit#4779 from tannewt/fix_sm_rp2040
Fix safe mode on rp2040
2 parents 9d8545e + 6d6089f commit 1d39be4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ jobs:
482482
id: idf-cache
483483
with:
484484
path: ${{ github.workspace }}/.idf_tools
485-
key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210422
485+
key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210518
486486
- name: Clone IDF submodules
487487
run: |
488488
(cd $IDF_PATH && git submodule update --init)

ports/raspberrypi/supervisor/port.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,13 @@ uint32_t *port_heap_get_top(void) {
196196
return port_stack_get_top();
197197
}
198198

199+
extern uint32_t __scratch_x_start__;
199200
void port_set_saved_word(uint32_t value) {
200-
// NOTE: This doesn't survive pressing the reset button (aka toggling RUN).
201-
watchdog_hw->scratch[0] = value;
201+
__scratch_x_start__ = value;
202202
}
203203

204204
uint32_t port_get_saved_word(void) {
205-
return watchdog_hw->scratch[0];
205+
return __scratch_x_start__;
206206
}
207207

208208
uint64_t port_get_raw_ticks(uint8_t *subticks) {

supervisor/shared/safe_mode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ safe_mode_t wait_for_safe_mode_reset(void) {
7878
#endif
7979
uint64_t start_ticks = supervisor_ticks_ms64();
8080
uint64_t diff = 0;
81-
while (diff < 700) {
81+
while (diff < 1000) {
8282
#ifdef MICROPY_HW_LED_STATUS
8383
// Blink on for 100, off for 100, on for 100, off for 100 and on for 200
8484
common_hal_digitalio_digitalinout_set_value(&status_led, diff > 100 && diff / 100 != 2 && diff / 100 != 4);

0 commit comments

Comments
 (0)
0