Setup duo board
This commit is contained in:
parent
3732f37ba9
commit
36bf98c9ee
1
.github/workflows/micropython.yml
vendored
1
.github/workflows/micropython.yml
vendored
@ -20,6 +20,7 @@ jobs:
|
|||||||
- name: pimoroni_plasma2350
|
- name: pimoroni_plasma2350
|
||||||
- name: pimoroni_tiny2350
|
- name: pimoroni_tiny2350
|
||||||
- name: pimoroni_pico_plus2
|
- name: pimoroni_pico_plus2
|
||||||
|
- name: pimoroni_interstate75_duo
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# MicroPython version will be contained in github.event.release.tag_name for releases
|
# MicroPython version will be contained in github.event.release.tag_name for releases
|
||||||
|
|||||||
19
boards/pimoroni_interstate75_duo/board.json
Normal file
19
boards/pimoroni_interstate75_duo/board.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"deploy": [
|
||||||
|
"../deploy.md"
|
||||||
|
],
|
||||||
|
"docs": "",
|
||||||
|
"features": [
|
||||||
|
"Dual-core",
|
||||||
|
"External Flash",
|
||||||
|
"USB"
|
||||||
|
],
|
||||||
|
"images": [
|
||||||
|
"rp2-picos.jpg"
|
||||||
|
],
|
||||||
|
"mcu": "rp2350",
|
||||||
|
"product": "Pico2",
|
||||||
|
"thumbnail": "",
|
||||||
|
"url": "https://www.raspberrypi.com/products/raspberry-pi-pico2/",
|
||||||
|
"vendor": "Raspberry Pi"
|
||||||
|
}
|
||||||
8
boards/pimoroni_interstate75_duo/manifest.py
Normal file
8
boards/pimoroni_interstate75_duo/manifest.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
require("bundle-networking")
|
||||||
|
|
||||||
|
# Bluetooth
|
||||||
|
require("aioble")
|
||||||
|
|
||||||
|
include("$(PORT_DIR)/boards/manifest.py")
|
||||||
|
|
||||||
|
include("../manifest_pico2.py")
|
||||||
39
boards/pimoroni_interstate75_duo/mpconfigboard.cmake
Normal file
39
boards/pimoroni_interstate75_duo/mpconfigboard.cmake
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# cmake file for Raspberry Pi Pico
|
||||||
|
set(PICO_BOARD "pimoroni_interstate75_duo")
|
||||||
|
set(PICO_BOARD_HEADER_DIRS ${CMAKE_CURRENT_LIST_DIR})
|
||||||
|
set(PICO_PLATFORM "rp2350")
|
||||||
|
set(PICO_NUM_GPIOS 48)
|
||||||
|
|
||||||
|
# Board specific version of the frozen manifest
|
||||||
|
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||||
|
|
||||||
|
set(MICROPY_C_HEAP_SIZE 4096)
|
||||||
|
|
||||||
|
# Links micropy_lib_lwip and sets MICROPY_PY_LWIP = 1
|
||||||
|
# Picked up and expanded upon in mpconfigboard.h
|
||||||
|
set(MICROPY_PY_LWIP ON)
|
||||||
|
|
||||||
|
# Links cyw43-driver and sets:
|
||||||
|
# MICROPY_PY_NETWORK_CYW43 = 1,
|
||||||
|
# MICROPY_PY_SOCKET_DEFAULT_TIMEOUT_MS = 30000
|
||||||
|
set(MICROPY_PY_NETWORK_CYW43 ON)
|
||||||
|
|
||||||
|
# Adds mpbthciport.c
|
||||||
|
# And sets:
|
||||||
|
# MICROPY_PY_BLUETOOTH = 1,
|
||||||
|
# MICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS = 1,
|
||||||
|
# MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE = 1
|
||||||
|
set(MICROPY_PY_BLUETOOTH ON)
|
||||||
|
|
||||||
|
# Links pico_btstack_hci_transport_cyw43
|
||||||
|
# And sets:
|
||||||
|
# MICROPY_BLUETOOTH_BTSTACK = 1,
|
||||||
|
# MICROPY_BLUETOOTH_BTSTACK_CONFIG_FILE =
|
||||||
|
set(MICROPY_BLUETOOTH_BTSTACK ON)
|
||||||
|
|
||||||
|
# Sets:
|
||||||
|
# CYW43_ENABLE_BLUETOOTH = 1,
|
||||||
|
# MICROPY_PY_BLUETOOTH_CYW43 = 1
|
||||||
|
set(MICROPY_PY_BLUETOOTH_CYW43 ON)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../common.cmake)
|
||||||
19
boards/pimoroni_interstate75_duo/mpconfigboard.h
Normal file
19
boards/pimoroni_interstate75_duo/mpconfigboard.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// Board and hardware specific configuration
|
||||||
|
#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - (2 * 1024 * 1024))
|
||||||
|
|
||||||
|
// Set up networking.
|
||||||
|
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "Interstate75Duo"
|
||||||
|
|
||||||
|
#define MICROPY_HW_BOARD_NAME "Pimoroni Interstate 75 Duo"
|
||||||
|
|
||||||
|
// Enable WiFi & PPP
|
||||||
|
#define MICROPY_PY_NETWORK (1)
|
||||||
|
|
||||||
|
// CYW43 driver configuration.
|
||||||
|
#define CYW43_USE_SPI (1)
|
||||||
|
#define CYW43_LWIP (1)
|
||||||
|
#define CYW43_GPIO (0)
|
||||||
|
#define CYW43_SPI_PIO (1)
|
||||||
|
|
||||||
|
int mp_hal_is_pin_reserved(int n);
|
||||||
|
#define MICROPY_HW_PIN_RESERVED(i) mp_hal_is_pin_reserved(i)
|
||||||
135
boards/pimoroni_interstate75_duo/pimoroni_interstate75_duo.h
Normal file
135
boards/pimoroni_interstate75_duo/pimoroni_interstate75_duo.h
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 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/pico.h"
|
||||||
|
|
||||||
|
// pico_cmake_set PICO_PLATFORM=rp2350
|
||||||
|
|
||||||
|
#ifndef _BOARDS_PICO2_H
|
||||||
|
#define _BOARDS_PICO2_H
|
||||||
|
|
||||||
|
// For board detection
|
||||||
|
#define RASPBERRYPI_PICO2
|
||||||
|
|
||||||
|
// --- 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 0
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_UART_RX_PIN
|
||||||
|
#define PICO_DEFAULT_UART_RX_PIN 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// --- LED ---
|
||||||
|
#ifndef PICO_DEFAULT_LED_PIN
|
||||||
|
#define PICO_DEFAULT_LED_PIN 25
|
||||||
|
#endif
|
||||||
|
// 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 18
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_SPI_TX_PIN
|
||||||
|
#define PICO_DEFAULT_SPI_TX_PIN 19
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_SPI_RX_PIN
|
||||||
|
#define PICO_DEFAULT_SPI_RX_PIN 16
|
||||||
|
#endif
|
||||||
|
#ifndef PICO_DEFAULT_SPI_CSN_PIN
|
||||||
|
#define PICO_DEFAULT_SPI_CSN_PIN 17
|
||||||
|
#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)
|
||||||
|
#define PICO_SMPS_MODE_PIN 23
|
||||||
|
|
||||||
|
// The GPIO Pin used to read VBUS to determine if the device is battery powered.
|
||||||
|
#ifndef PICO_VBUS_PIN
|
||||||
|
#define PICO_VBUS_PIN 24
|
||||||
|
#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
|
||||||
|
#define PICO_VSYS_PIN 29
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PICO_RP2350_A2_SUPPORTED
|
||||||
|
#define PICO_RP2350_A2_SUPPORTED 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// PICO_CONFIG: CYW43_PIN_WL_DYNAMIC, flag to indicate if cyw43 SPI pins can be changed at runtime, type=bool, default=false, advanced=true, group=pico_cyw43_driver
|
||||||
|
#ifndef CYW43_PIN_WL_DYNAMIC
|
||||||
|
#define CYW43_PIN_WL_DYNAMIC 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_REG_ON, gpio pin to power up the cyw43 chip, type=int, default=23, advanced=true, group=pico_cyw43_driver
|
||||||
|
#ifndef CYW43_DEFAULT_PIN_WL_REG_ON
|
||||||
|
#define CYW43_DEFAULT_PIN_WL_REG_ON 23u
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_DATA_OUT, gpio pin for spi data out to the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
|
||||||
|
#ifndef CYW43_DEFAULT_PIN_WL_DATA_OUT
|
||||||
|
#define CYW43_DEFAULT_PIN_WL_DATA_OUT 24u
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_DATA_IN, gpio pin for spi data in from the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
|
||||||
|
#ifndef CYW43_DEFAULT_PIN_WL_DATA_IN
|
||||||
|
#define CYW43_DEFAULT_PIN_WL_DATA_IN 24u
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_HOST_WAKE, gpio (irq) pin for the irq line from the cyw43 chip, type=int, default=24, advanced=true, group=pico_cyw43_driver
|
||||||
|
#ifndef CYW43_DEFAULT_PIN_WL_HOST_WAKE
|
||||||
|
#define CYW43_DEFAULT_PIN_WL_HOST_WAKE 24u
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_CLOCK, gpio pin for the spi clock line to the cyw43 chip, type=int, default=29, advanced=true, group=pico_cyw43_driver
|
||||||
|
#ifndef CYW43_DEFAULT_PIN_WL_CLOCK
|
||||||
|
#define CYW43_DEFAULT_PIN_WL_CLOCK 29u
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// PICO_CONFIG: CYW43_DEFAULT_PIN_WL_CS, gpio pin for the spi chip select to the cyw43 chip, type=int, default=25, advanced=true, group=pico_cyw43_driver
|
||||||
|
#ifndef CYW43_DEFAULT_PIN_WL_CS
|
||||||
|
#define CYW43_DEFAULT_PIN_WL_CS 25u
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
47
boards/pimoroni_interstate75_duo/pins.csv
Normal file
47
boards/pimoroni_interstate75_duo/pins.csv
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
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
|
||||||
|
LED,GPIO25
|
||||||
|
3
boards/pimoroni_interstate75_duo/usermodules.cmake
Normal file
3
boards/pimoroni_interstate75_duo/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