Merge pull request #8170 from tannewt/fix_rp2_safe_mode
Fix rp2 safe mode via reset press
This commit is contained in:
commit
4a21e05ab6
@ -2,6 +2,7 @@
|
||||
#define MICROPY_HW_MCU_NAME "rp2040"
|
||||
|
||||
#define MICROPY_HW_NEOPIXEL (&pin_GPIO21)
|
||||
#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO20)
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2)
|
||||
|
@ -247,14 +247,15 @@ uint32_t *port_heap_get_top(void) {
|
||||
return port_stack_get_top();
|
||||
}
|
||||
|
||||
uint32_t __uninitialized_ram(saved_word);
|
||||
void port_set_saved_word(uint32_t value) {
|
||||
// Store in a watchdog scratch register instead of RAM. 4-7 are used by the
|
||||
// sdk. 0 is used by alarm. 1-3 are free.
|
||||
watchdog_hw->scratch[1] = value;
|
||||
// Store in RAM because the watchdog scratch registers don't survive
|
||||
// resetting by pulling the RUN pin low.
|
||||
saved_word = value;
|
||||
}
|
||||
|
||||
uint32_t port_get_saved_word(void) {
|
||||
return watchdog_hw->scratch[1];
|
||||
return saved_word;
|
||||
}
|
||||
|
||||
static volatile bool ticks_enabled;
|
||||
|
Loading…
Reference in New Issue
Block a user