From 22276710e67884af3fc64eae1f35173a91ce96ca Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 25 Feb 2021 15:50:49 -0600 Subject: [PATCH 1/3] rp2pio: Fix writing where the stride was 2 or 4 The wrong stride value was being checked. --- ports/raspberrypi/common-hal/rp2pio/StateMachine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c index 5973f47a2e..7d2385064f 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c @@ -640,9 +640,9 @@ static bool _transfer(rp2pio_statemachine_obj_t *self, while (tx_remaining && !pio_sm_is_tx_fifo_full(self->pio, self->state_machine)) { if (out_stride_in_bytes == 1) { *tx_destination = *data_out; - } else if (in_stride_in_bytes == 2) { + } else if (out_stride_in_bytes == 2) { *((uint16_t*) tx_destination) = *((uint16_t*) data_out); - } else if (in_stride_in_bytes == 4) { + } else if (out_stride_in_bytes == 4) { *((uint32_t*) tx_destination) = *((uint32_t*) data_out); } data_out += out_stride_in_bytes; From 80f7972f72e8d437813457b72d04bb87df496813 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 25 Feb 2021 14:46:08 -0800 Subject: [PATCH 2/3] Update RP2040 Feather pinout for production rev --- ports/raspberrypi/boards/adafruit_feather_rp2040/board.c | 4 ---- ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/board.c b/ports/raspberrypi/boards/adafruit_feather_rp2040/board.c index 8686f6d0c2..c4021a83e9 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040/board.c +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/board.c @@ -30,10 +30,6 @@ #include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" void board_init(void) { - common_hal_never_reset_pin(&pin_GPIO17); - gpio_init(17); - gpio_set_dir(17, GPIO_OUT); - gpio_put(17, true); } bool board_requests_safe_mode(void) { diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c index 1617ac865e..d4840cdca9 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c @@ -14,12 +14,12 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, - { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO3) }, - { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, - { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, From f0432b9d6f6c532291ee01b76ffa2b77f7732557 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 25 Feb 2021 16:37:34 -0800 Subject: [PATCH 3/3] Remove neopixel power --- ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c index d4840cdca9..a558d7fe6c 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/pins.c @@ -27,7 +27,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO16) }, - { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },