1.. zephyr:board:: w5500_evb_pico2
2
3Overview
4********
5
6W5500-EVB-Pico2 is a microcontroller evaluation board based on the Raspberry
7Pi RP2350A and fully hardwired TCP/IP controller W5500 - and basically works
8the same as Raspberry Pi Pico2 board but with additional Ethernet via W5500.
9The USB bootloader allows the ability to flash without any adapter, in a
10drag-and-drop manner. It is also possible to flash and debug the boards with
11their SWD interface, using an external adapter.
12
13Hardware
14********
15
16- Dual core Arm Cortex-M33 or Hazard3 processor running up to 133MHz
17- 520KB on-chip SRAM
18- 16MB on-board QSPI flash with XIP capabilities
19- 26 GPIO pins
20- 3 Analog inputs
21- 2 UART peripherals
22- 2 SPI controllers
23- 2 I2C controllers
24- 16 PWM channels
25- USB 1.1 controller (host/device)
26- 3 Programmable I/O (PIO) for custom peripherals
27- On-board LED
28- 1 Watchdog timer peripheral
29- Wiznet W5500 Ethernet MAC/PHY
30
31Supported Features
32==================
33
34.. zephyr:board-supported-hw::
35
36Pin Mapping
37===========
38
39The peripherals of the RP2350A SoC can be routed to various pins on the board.
40The configuration of these routes can be modified through DTS. Please refer to
41the datasheet to see the possible routings for each peripheral.
42
43External pin mapping on the W5500_EVB_PICO2 is identical to the Raspberry Pi
44Pico2. Since GPIO 25 is routed to the on-board LED on, similar to the Raspberry
45Pi Pico, the blinky example works as intended. The W5500 is routed to the SPI0
46(P16-P19), with the reset and interrupt signal for the W5500 routed to P20 and
47P21, respectively. All of these are shared with the edge connector on the
48board.
49
50Refer to `W55500 Evaluation Board Pico2 Documentation`_ for a board schematic and
51other certifications.
52
53Default Zephyr Peripheral Mapping:
54----------------------------------
55
56.. rst-class:: rst-columns
57
58- UART0_TX : P0
59- UART0_RX : P1
60- I2C0_SDA : P4
61- I2C0_SCL : P5
62- I2C1_SDA : P14
63- I2C1_SCL : P15
64- SPI0_RX : P16
65- SPI0_CSN : P17
66- SPI0_SCK : P18
67- SPI0_TX : P19
68- W5500 Reset : P20
69- W5500 Interrupt : P21
70- ADC_CH0 : P26
71- ADC_CH1 : P27
72- ADC_CH2 : P28
73- ADC_CH3 : P29
74
75Programming and Debugging
76*************************
77
78Flashing
79========
80
81Using OpenOCD
82-------------
83
84The overall explanation regarding flashing and debugging is the same as or
85``rpi_pico``.
86See :ref:`rpi_pico_flashing_using_openocd`. in ``rpi_pico`` documentation.
87
88A typical build command for w5500_evb_pico2 is as follows.
89This assumes a CMSIS-DAP adapter such as the RaspberryPi Debug Probe,
90but if you are using something else, specify ``RPI_PICO_DEBUG_ADAPTER``.
91
92.. zephyr-app-commands::
93   :zephyr-app: samples/basic/blinky
94   :board: w5500_evb_pico2
95   :goals: build flash
96   :gen-args: -DOPENOCD=/usr/local/bin/openocd
97
98Using UF2
99---------
100
101If you don't have an SWD adapter, you can flash the Raspberry Pi Pico with
102a UF2 file. By default, building an app for this board will generate a
103:file:`build/zephyr/zephyr.uf2` file. If the Pico is powered on with the ``BOOTSEL``
104button pressed, it will appear on the host as a mass storage device. The
105UF2 file should be drag-and-dropped to the device, which will flash the Pico.
106
107Debugging
108=========
109
110The SWD interface can also be used to debug the board. To achieve this, you can
111either use SEGGER JLink or OpenOCD.
112
113Using OpenOCD
114-------------
115
116Install OpenOCD as described for flashing the board.
117
118Here is an example for debugging the :zephyr:code-sample:`blinky` application.
119
120.. zephyr-app-commands::
121   :zephyr-app: samples/basic/blinky
122   :board: w5500_evb_pico2
123   :maybe-skip-config:
124   :goals: debug
125   :gen-args: -DOPENOCD=/usr/local/bin/openocd
126
127.. target-notes::
128
129.. _pico_setup.sh:
130  https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh
131
132.. _Getting Started with Raspberry Pi Pico:
133  https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf
134
135.. _W55500 Evaluation Board Pico2 Documentation:
136  https://docs.wiznet.io/Product/iEthernet/W5500/w5500-evb-pico2
137