Add Pimoroni Pico LiPo 2XL W.
This commit is contained in:
parent
31419eeb80
commit
9ec3001410
1
.github/workflows/micropython.yml
vendored
1
.github/workflows/micropython.yml
vendored
@ -21,6 +21,7 @@ jobs:
|
||||
- name: pimoroni_tiny2350
|
||||
- name: pimoroni_pico_plus2
|
||||
- name: pimoroni_pico_lipo2
|
||||
- name: pimoroni_pico_lipo2xl_w
|
||||
|
||||
env:
|
||||
# MicroPython version will be contained in github.event.release.tag_name for releases
|
||||
|
||||
8
boards/pimoroni_pico_lipo2xl_w/manifest.py
Normal file
8
boards/pimoroni_pico_lipo2xl_w/manifest.py
Normal file
@ -0,0 +1,8 @@
|
||||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
|
||||
require("bundle-networking")
|
||||
|
||||
# Bluetooth
|
||||
require("aioble")
|
||||
|
||||
include("../manifest_pico2.py")
|
||||
19
boards/pimoroni_pico_lipo2xl_w/mpconfigboard.cmake
Normal file
19
boards/pimoroni_pico_lipo2xl_w/mpconfigboard.cmake
Normal file
@ -0,0 +1,19 @@
|
||||
# cmake file for Pimoroni Pico LiPo
|
||||
set(PICO_BOARD "pimoroni_pico_lipo2xl_w")
|
||||
set(PICO_PLATFORM "rp2350")
|
||||
|
||||
set(PICO_BOARD_HEADER_DIRS ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
# To change the gpio count for QFN-80
|
||||
set(PICO_NUM_GPIOS 48)
|
||||
|
||||
# Links micropy_lib_lwip and sets MICROPY_PY_LWIP = 1
|
||||
# Picked up and expanded upon in mpconfigboard.h
|
||||
set(MICROPY_PY_LWIP ON)
|
||||
|
||||
include(enable_cyw43.cmake)
|
||||
|
||||
# Board specific version of the frozen manifest
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../common.cmake)
|
||||
15
boards/pimoroni_pico_lipo2xl_w/mpconfigboard.h
Normal file
15
boards/pimoroni_pico_lipo2xl_w/mpconfigboard.h
Normal file
@ -0,0 +1,15 @@
|
||||
// Board and hardware specific configuration
|
||||
#define MICROPY_HW_BOARD_NAME "Pimoroni Pico LiPo 2XL W"
|
||||
#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - 1024 * 1024 * 2)
|
||||
|
||||
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "PicoLiPo2XLW"
|
||||
|
||||
// Enable PPP
|
||||
#define MICROPY_PY_NETWORK_PPP_LWIP (1)
|
||||
|
||||
#include "enable_cyw43.h"
|
||||
|
||||
// PSRAM Settings
|
||||
#define MICROPY_HW_ENABLE_PSRAM (1)
|
||||
#define MICROPY_HW_PSRAM_CS_PIN PIMORONI_PICO_LIPO2_PSRAM_CS_PIN
|
||||
#define MICROPY_GC_SPLIT_HEAP (1)
|
||||
163
boards/pimoroni_pico_lipo2xl_w/pimoroni_pico_lipo2xl_w.h
Normal file
163
boards/pimoroni_pico_lipo2xl_w/pimoroni_pico_lipo2xl_w.h
Normal file
@ -0,0 +1,163 @@
|
||||
/*
|
||||
* Copyright (c) 2024 Raspberry Pi (Trading) Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
// -----------------------------------------------------
|
||||
// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO
|
||||
// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES
|
||||
// -----------------------------------------------------
|
||||
|
||||
// This header may be included by other board headers as "boards/pimoroni_pico_lipo2xl_w.h"
|
||||
|
||||
// pico_cmake_set PICO_PLATFORM=rp2350
|
||||
// pico_cmake_set PICO_CYW43_SUPPORTED = 1
|
||||
|
||||
#ifndef _BOARDS_PICO2_W_H
|
||||
#define _BOARDS_PICO2_W_H
|
||||
|
||||
// For board detection
|
||||
#define PIMORONI_PICO_LIPO2_RP2350
|
||||
|
||||
// --- BOARD SPECIFIC ---
|
||||
#define SPICE_SPI 0
|
||||
#define SPICE_TX_MISO_PIN 32
|
||||
#define SPICE_RX_CS_PIN 33
|
||||
#define SPICE_NETLIGHT_SCK_PIN 34
|
||||
#define SPICE_RESET_MOSI_PIN 35
|
||||
#define SPICE_PWRKEY_BL_PIN 36
|
||||
|
||||
#define PIMORONI_PICO_LIPO2_USER_SW_PIN 30
|
||||
#define PIMORONI_PICO_LIPO2_PSRAM_CS_PIN 47
|
||||
|
||||
// --- RP2350 VARIANT ---
|
||||
// not PICO_RP2350A
|
||||
|
||||
// --- UART ---
|
||||
#ifndef PICO_DEFAULT_UART
|
||||
#define PICO_DEFAULT_UART 0
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_UART_TX_PIN
|
||||
#define PICO_DEFAULT_UART_TX_PIN SPICE_TX_MISO_PIN
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_UART_RX_PIN
|
||||
#define PICO_DEFAULT_UART_RX_PIN SPICE_RX_CS_PIN
|
||||
#endif
|
||||
|
||||
// --- LED ---
|
||||
// no PICO_DEFAULT_LED_PIN - LED is on Wireless chip
|
||||
// no PICO_DEFAULT_WS2812_PIN
|
||||
|
||||
// --- I2C ---
|
||||
#ifndef PICO_DEFAULT_I2C
|
||||
#define PICO_DEFAULT_I2C 0
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_I2C_SDA_PIN
|
||||
#define PICO_DEFAULT_I2C_SDA_PIN 4
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_I2C_SCL_PIN
|
||||
#define PICO_DEFAULT_I2C_SCL_PIN 5
|
||||
#endif
|
||||
|
||||
// --- SPI ---
|
||||
#ifndef PICO_DEFAULT_SPI
|
||||
#define PICO_DEFAULT_SPI 0
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_SPI_SCK_PIN
|
||||
#define PICO_DEFAULT_SPI_SCK_PIN SPICE_NETLIGHT_SCK_PIN
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_SPI_TX_PIN
|
||||
#define PICO_DEFAULT_SPI_TX_PIN SPICE_RESET_MOSI_PIN
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_SPI_RX_PIN
|
||||
#define PICO_DEFAULT_SPI_RX_PIN SPICE_TX_MISO_PIN
|
||||
#endif
|
||||
#ifndef PICO_DEFAULT_SPI_CSN_PIN
|
||||
#define PICO_DEFAULT_SPI_CSN_PIN SPICE_RX_CS_PIN
|
||||
#endif
|
||||
|
||||
// --- FLASH ---
|
||||
|
||||
#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
|
||||
|
||||
#ifndef PICO_FLASH_SPI_CLKDIV
|
||||
#define PICO_FLASH_SPI_CLKDIV 2
|
||||
#endif
|
||||
|
||||
// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (4 * 1024 * 1024)
|
||||
#ifndef PICO_FLASH_SIZE_BYTES
|
||||
#define PICO_FLASH_SIZE_BYTES (4 * 1024 * 1024)
|
||||
#endif
|
||||
// Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads)
|
||||
// note the SMSP mode pin is on WL_GPIO1
|
||||
|
||||
#ifndef CYW43_WL_GPIO_COUNT
|
||||
#define CYW43_WL_GPIO_COUNT 3
|
||||
#endif
|
||||
|
||||
#ifndef CYW43_WL_GPIO_LED_PIN
|
||||
#define CYW43_WL_GPIO_LED_PIN 0
|
||||
#endif
|
||||
|
||||
// If CYW43_WL_GPIO_VBUS_PIN is defined then a CYW43 GPIO has to be used to read VBUS.
|
||||
// This can be passed to cyw43_arch_gpio_get to determine if the device is battery powered.
|
||||
// PICO_VBUS_PIN and CYW43_WL_GPIO_VBUS_PIN should not both be defined.
|
||||
#ifndef CYW43_WL_GPIO_VBUS_PIN
|
||||
#define CYW43_WL_GPIO_VBUS_PIN 2
|
||||
#endif
|
||||
|
||||
// If CYW43_USES_VSYS_PIN is defined then CYW43 uses the VSYS GPIO (defined by PICO_VSYS_PIN) for other purposes.
|
||||
// If this is the case, to use the VSYS GPIO it's necessary to ensure CYW43 is not using it.
|
||||
// This can be achieved by wrapping the use of the VSYS GPIO in cyw43_thread_enter / cyw43_thread_exit.
|
||||
#ifndef CYW43_USES_VSYS_PIN
|
||||
// no CYW43_USES_VSYS_PIN
|
||||
#endif
|
||||
|
||||
// The GPIO Pin used to monitor VSYS. Typically you would use this with ADC.
|
||||
// There is an example in adc/read_vsys in pico-examples.
|
||||
#ifndef PICO_VSYS_PIN
|
||||
// no PICO_VSYS_PIN
|
||||
#endif
|
||||
|
||||
// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1
|
||||
#ifndef PICO_RP2350_A2_SUPPORTED
|
||||
#define PICO_RP2350_A2_SUPPORTED 1
|
||||
#endif
|
||||
|
||||
// cyw43 SPI pins can't be changed at runtime
|
||||
#ifndef CYW43_PIN_WL_DYNAMIC
|
||||
#define CYW43_PIN_WL_DYNAMIC 0
|
||||
#endif
|
||||
|
||||
// gpio pin to power up the cyw43 chip
|
||||
#ifndef CYW43_DEFAULT_PIN_WL_REG_ON
|
||||
#define CYW43_DEFAULT_PIN_WL_REG_ON 23
|
||||
#endif
|
||||
|
||||
// gpio pin for spi data out to the cyw43 chip
|
||||
#ifndef CYW43_DEFAULT_PIN_WL_DATA_OUT
|
||||
#define CYW43_DEFAULT_PIN_WL_DATA_OUT 24
|
||||
#endif
|
||||
|
||||
// gpio pin for spi data in from the cyw43 chip
|
||||
#ifndef CYW43_DEFAULT_PIN_WL_DATA_IN
|
||||
#define CYW43_DEFAULT_PIN_WL_DATA_IN 24
|
||||
#endif
|
||||
|
||||
// gpio (irq) pin for the irq line from the cyw43 chip
|
||||
#ifndef CYW43_DEFAULT_PIN_WL_HOST_WAKE
|
||||
#define CYW43_DEFAULT_PIN_WL_HOST_WAKE 24
|
||||
#endif
|
||||
|
||||
// gpio pin for the spi clock line to the cyw43 chip
|
||||
#ifndef CYW43_DEFAULT_PIN_WL_CLOCK
|
||||
#define CYW43_DEFAULT_PIN_WL_CLOCK 29
|
||||
#endif
|
||||
|
||||
// gpio pin for the spi chip select to the cyw43 chip
|
||||
#ifndef CYW43_DEFAULT_PIN_WL_CS
|
||||
#define CYW43_DEFAULT_PIN_WL_CS 25
|
||||
#endif
|
||||
|
||||
#endif
|
||||
58
boards/pimoroni_pico_lipo2xl_w/pins.csv
Normal file
58
boards/pimoroni_pico_lipo2xl_w/pins.csv
Normal file
@ -0,0 +1,58 @@
|
||||
GP0,GPIO0
|
||||
GP1,GPIO1
|
||||
GP2,GPIO2
|
||||
GP3,GPIO3
|
||||
GP4,GPIO4
|
||||
GP5,GPIO5
|
||||
GP6,GPIO6
|
||||
GP7,GPIO7
|
||||
GP8,GPIO8
|
||||
GP9,GPIO9
|
||||
GP10,GPIO10
|
||||
GP11,GPIO11
|
||||
GP12,GPIO12
|
||||
GP13,GPIO13
|
||||
GP14,GPIO14
|
||||
GP15,GPIO15
|
||||
GP16,GPIO16
|
||||
GP17,GPIO17
|
||||
GP18,GPIO18
|
||||
GP19,GPIO19
|
||||
GP20,GPIO20
|
||||
GP21,GPIO21
|
||||
GP22,GPIO22
|
||||
GP25,GPIO25
|
||||
GP26,GPIO26
|
||||
GP27,GPIO27
|
||||
GP28,GPIO28
|
||||
GP29,GPIO29
|
||||
GP30,GPIO30
|
||||
GP31,GPIO31
|
||||
GP32,GPIO32
|
||||
GP33,GPIO33
|
||||
GP34,GPIO34
|
||||
GP35,GPIO35
|
||||
GP36,GPIO36
|
||||
GP37,GPIO37
|
||||
GP38,GPIO38
|
||||
GP39,GPIO39
|
||||
GP40,GPIO40
|
||||
GP41,GPIO41
|
||||
GP42,GPIO42
|
||||
GP43,GPIO43
|
||||
GP44,GPIO44
|
||||
GP45,GPIO45
|
||||
GP46,GPIO46
|
||||
GP47,GPIO47
|
||||
WL_GPIO0,EXT_GPIO0
|
||||
WL_GPIO1,EXT_GPIO1
|
||||
WL_GPIO2,EXT_GPIO2
|
||||
LED,EXT_GPIO0
|
||||
VBUS_SENSE,EXT_GPIO2
|
||||
SPICE_TX_MISO,GPIO32
|
||||
SPICE_RX_CS,GPIO33
|
||||
SPICE_NETLIGHT_SCK,GPIO34
|
||||
SPICE_RESET_MOSI,GPIO35
|
||||
SPICE_PWRKEY_BL,GPIO36
|
||||
VBAT_SENSE,GPIO43
|
||||
PSRAM_CS,GPIO47
|
||||
|
3
boards/pimoroni_pico_lipo2xl_w/usermodules.cmake
Normal file
3
boards/pimoroni_pico_lipo2xl_w/usermodules.cmake
Normal file
@ -0,0 +1,3 @@
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../")
|
||||
|
||||
include(usermod-common)
|
||||
Loading…
Reference in New Issue
Block a user