Skip to content

ports/rp2/boards: Add support for WIZnet-EVB-Pico2 #16280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions ports/rp2/boards/W5100S_EVB_PICO2/board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"deploy": [
"../deploy.md"
],
"docs": "",
"features": [
"Dual-core",
"Ethernet",
"External Flash",
"USB"
],
"images": [
"W5100S-EVB-Pico2.jpg"
],
"mcu": "rp2350",
"product": "Wiznet W5100S-EVB-Pico2",
"thumbnail": "",
"url": "https://docs.wiznet.io/Product/iEthernet/W5100S/w5100s-evb-pico2",
"variants": {
"RISCV": "RISC-V CPU mode"
},
"vendor": "Wiznet"
}
3 changes: 3 additions & 0 deletions ports/rp2/boards/W5100S_EVB_PICO2/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include("$(PORT_DIR)/boards/manifest.py")

require("bundle-networking")
5 changes: 5 additions & 0 deletions ports/rp2/boards/W5100S_EVB_PICO2/mpconfigboard.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# cmake file for Wiznet W5100S-EVB-Pico2.
set(PICO_BOARD "pico2")
set(MICROPY_PY_NETWORK_WIZNET5K W5100S)
set(MICROPY_PY_LWIP 1)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
20 changes: 20 additions & 0 deletions ports/rp2/boards/W5100S_EVB_PICO2/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Board config for Wiznet W5100S-EVB-Pico2.

// Board and hardware specific configuration
#define MICROPY_HW_BOARD_NAME "W5100S-EVB-Pico2"
#define MICROPY_HW_FLASH_STORAGE_BYTES (1408 * 1024)

// Enable networking.
#define MICROPY_PY_NETWORK (1)
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "W5100S-EVB-PICO2"

// Wiznet HW config.
#define MICROPY_HW_WIZNET_SPI_ID (0)
#define MICROPY_HW_WIZNET_SPI_BAUDRATE (20 * 1000 * 1000)
#define MICROPY_HW_WIZNET_SPI_SCK (18)
#define MICROPY_HW_WIZNET_SPI_MOSI (19)
#define MICROPY_HW_WIZNET_SPI_MISO (16)
#define MICROPY_HW_WIZNET_PIN_CS (17)
#define MICROPY_HW_WIZNET_PIN_RST (20)
// Connecting the INTN pin enables RECV interrupt handling of incoming data.
#define MICROPY_HW_WIZNET_PIN_INTN (21)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(PICO_PLATFORM "rp2350-riscv")
1 change: 1 addition & 0 deletions ports/rp2/boards/W5100S_EVB_PICO2/pins.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LED,GPIO25
18 changes: 18 additions & 0 deletions ports/rp2/boards/W5100S_EVB_PICO2/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Wiznet W5100S-EVB-Pico2

## Network Example

To use network / socket based code, connect ethernet port to network with DHCP running:

```
>>> import network
>>> nic = network.WIZNET5K()
>>> nic.active(True)
>>> nic.ifconfig()
('0.0.0.0', '0.0.0.0', '0.0.0.0', '0.0.0.0')
>>> nic.ifconfig("dhcp")
('192.168.0.10', '255.255.255.0', '192.168.0.1', '192.168.0.1')
>>> nic.isconnected()
True
```
At this point standard network communications libraries should work.
23 changes: 23 additions & 0 deletions ports/rp2/boards/W5500_EVB_PICO2/board.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"deploy": [
"../deploy.md"
],
"docs": "",
"features": [
"Dual-core",
"Ethernet",
"External Flash",
"USB"
],
"images": [
"W5500-EVB-Pico2.jpg"
],
"mcu": "rp2350",
"product": "Wiznet W5500-EVB-Pico2",
"thumbnail": "",
"url": "https://docs.wiznet.io/Product/iEthernet/W5500/w5500-evb-pico2",
"variants": {
"RISCV": "RISC-V CPU mode"
},
"vendor": "Wiznet"
}
3 changes: 3 additions & 0 deletions ports/rp2/boards/W5500_EVB_PICO2/manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include("$(PORT_DIR)/boards/manifest.py")

require("bundle-networking")
5 changes: 5 additions & 0 deletions ports/rp2/boards/W5500_EVB_PICO2/mpconfigboard.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# cmake file for Wiznet W5500-EVB-Pico2.
set(PICO_BOARD "pico2")
set(MICROPY_PY_NETWORK_WIZNET5K W5500)
set(MICROPY_PY_LWIP 1)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
20 changes: 20 additions & 0 deletions ports/rp2/boards/W5500_EVB_PICO2/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Board config for Wiznet W5500-EVB-Pico2.

// Board and hardware specific configuration
#define MICROPY_HW_BOARD_NAME "W5500-EVB-Pico2"
#define MICROPY_HW_FLASH_STORAGE_BYTES (1408 * 1024)

// Enable networking.
#define MICROPY_PY_NETWORK (1)
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "W5500-EVB-PICO2"

// Wiznet HW config.
#define MICROPY_HW_WIZNET_SPI_ID (0)
#define MICROPY_HW_WIZNET_SPI_BAUDRATE (20 * 1000 * 1000)
#define MICROPY_HW_WIZNET_SPI_SCK (18)
#define MICROPY_HW_WIZNET_SPI_MOSI (19)
#define MICROPY_HW_WIZNET_SPI_MISO (16)
#define MICROPY_HW_WIZNET_PIN_CS (17)
#define MICROPY_HW_WIZNET_PIN_RST (20)
// Connecting the INTN pin enables RECV interrupt handling of incoming data.
#define MICROPY_HW_WIZNET_PIN_INTN (21)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(PICO_PLATFORM "rp2350-riscv")
1 change: 1 addition & 0 deletions ports/rp2/boards/W5500_EVB_PICO2/pins.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LED,GPIO25
18 changes: 18 additions & 0 deletions ports/rp2/boards/W5500_EVB_PICO2/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Wiznet W5500-EVB-Pico2

## Network Example

To use network / socket based code, connect ethernet port to network with DHCP running:

```
>>> import network
>>> nic = network.WIZNET5K()
>>> nic.active(True)
>>> nic.ifconfig()
('0.0.0.0', '0.0.0.0', '0.0.0.0', '0.0.0.0')
>>> nic.ifconfig("dhcp")
('192.168.0.10', '255.255.255.0', '192.168.0.1', '192.168.0.1')
>>> nic.isconnected()
True
```
At this point standard network communications libraries should work.
Loading