From 7eaad625681be7e33cad985c313354fc1377cb73 Mon Sep 17 00:00:00 2001 From: sago35 Date: Tue, 5 Jul 2022 20:03:51 +0900 Subject: [PATCH] feather-rp2040,macropad-rp2040: fix qspi-flash settings --- targets/feather-rp2040-boot-stage2.S | 4 ++-- targets/macropad-rp2040-boot-stage2.S | 17 +++++++++++++++++ targets/macropad-rp2040.json | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 targets/macropad-rp2040-boot-stage2.S diff --git a/targets/feather-rp2040-boot-stage2.S b/targets/feather-rp2040-boot-stage2.S index e6e694a4..fad30890 100644 --- a/targets/feather-rp2040-boot-stage2.S +++ b/targets/feather-rp2040-boot-stage2.S @@ -6,7 +6,7 @@ // rp2040-boot-stage2.S // -#define BOARD_PICO_FLASH_SPI_CLKDIV 2 +#define BOARD_PICO_FLASH_SPI_CLKDIV 4 #define BOARD_CMD_READ 0xe7 #define BOARD_QUAD_OK 1 #define BOARD_QUAD_ENABLE_STATUS_BYTE 2 @@ -14,4 +14,4 @@ #define BOARD_SPLIT_STATUS_WRITE 1 #define BOARD_WAIT_CYCLES 2 -#include "rp2040-boot-stage2.S" \ No newline at end of file +#include "rp2040-boot-stage2.S" diff --git a/targets/macropad-rp2040-boot-stage2.S b/targets/macropad-rp2040-boot-stage2.S new file mode 100644 index 00000000..52c6affd --- /dev/null +++ b/targets/macropad-rp2040-boot-stage2.S @@ -0,0 +1,17 @@ +// Adafruit MacroPad RP2040 Stage 2 Bootloader + +// +// This file defines the parameters specific to the flash-chip found +// on the Adafruit MacroPad RP2040. The generic implementation is in +// rp2040-boot-stage2.S +// + +#define BOARD_PICO_FLASH_SPI_CLKDIV 4 +#define BOARD_CMD_READ 0xeb +#define BOARD_QUAD_OK 1 +#define BOARD_QUAD_ENABLE_STATUS_BYTE 2 +#define BOARD_QUAD_ENABLE_BIT_MASK 2 +#define BOARD_SPLIT_STATUS_WRITE 0 +#define BOARD_WAIT_CYCLES 4 + +#include "rp2040-boot-stage2.S" diff --git a/targets/macropad-rp2040.json b/targets/macropad-rp2040.json index 78714fbd..f0e89a10 100644 --- a/targets/macropad-rp2040.json +++ b/targets/macropad-rp2040.json @@ -7,6 +7,6 @@ "serial-port": ["acm:239a:8107"], "linkerscript": "targets/pico.ld", "extra-files": [ - "targets/pico-boot-stage2.S" + "targets/macropad-rp2040-boot-stage2.S" ] }