rp2040.enableDoubleResetBootloader only on RP2040 (#2607)
The RP2350 boot ROM seems to randomize memory on a HW reset, including both CPU stacks where we normally stuff the "reset to bootloader" flag. Update the docs and source to remove rp2040.enableDoubleResetBootloader() on RP2350-based boards. Fixes #2606
This commit is contained in:
parent
7a0adfebd1
commit
083d86d251
3 changed files with 8 additions and 2 deletions
|
|
@ -18,6 +18,8 @@
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef PICO_RP2040
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <hardware/structs/psm.h>
|
#include <hardware/structs/psm.h>
|
||||||
|
|
||||||
|
|
@ -31,3 +33,5 @@ void RP2040::enableDoubleResetBootloader() {
|
||||||
boot_double_tap_check();
|
boot_double_tap_check();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,9 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PICO_RP2040
|
||||||
static void enableDoubleResetBootloader();
|
static void enableDoubleResetBootloader();
|
||||||
|
#endif
|
||||||
|
|
||||||
void wdt_begin(uint32_t delay_ms) {
|
void wdt_begin(uint32_t delay_ms) {
|
||||||
watchdog_enable(delay_ms, 1);
|
watchdog_enable(delay_ms, 1);
|
||||||
|
|
|
||||||
|
|
@ -95,8 +95,8 @@ doing any WiFi calls.
|
||||||
Bootloader
|
Bootloader
|
||||||
----------
|
----------
|
||||||
|
|
||||||
void rp2040.enableDoubleResetBootloader()
|
void rp2040.enableDoubleResetBootloader() (Pico/RP2040 only)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Add a call anywhere in the sketch to ``rp2040.enableDoubleResetBootloader()`` and
|
Add a call anywhere in the sketch to ``rp2040.enableDoubleResetBootloader()`` and
|
||||||
the core will check for a double-tap on reset, and if found will start the USB
|
the core will check for a double-tap on reset, and if found will start the USB
|
||||||
bootloader.
|
bootloader.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue