Difference between revisions of "RP2040-Zero"

From Waveshare Wiki
Jump to: navigation, search
 
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div class="tabber">
+
<div class="wiki-pages jet-green-color">
<div class="tabbertab" title="Introduction">
 
 
{{infobox item
 
{{infobox item
|img=<div class="tabber"><div class="tabbertab" title="RP2040-Zero">[[File:RP2040-Zero-1.jpg|360px| link=https://www.waveshare.com/rp2040-zero.htm| RP2040-Zero]]</div><div class="tabbertab" title="RP2040-Zero-M">[[File:RP2040-Zero-M-1.jpg|360px| link=https://www.waveshare.com/rp2040-zero-m.htm| RP2040-Zero-M]]</div></div>
+
|name1=RP2040-Zero
 +
|name2=with pre-soldered pin header
 +
|img=[[File:RP2040-Zero-1.jpg|300px|{{Amazon_nolink|default={{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}|url=link=https://www.waveshare.com/rp2040-zero.htm}}]]
 +
|img2=[[File:RP2040-Zero-M-1.jpg|300px|{{Amazon_nolink|default={{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}|url=link=https://www.waveshare.com/rp2040-zero.htm?sku=20335}}]]
 
|category=[[:Category:Raspberry Pi|Raspberry Pi]]
 
|category=[[:Category:Raspberry Pi|Raspberry Pi]]
 
|brand=Waveshare
 
|brand=Waveshare
|{{#urlget:amazon|default}}=display
+
|{{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}=display
 
|website_cn=[https://www.waveshare.net 官方中文站点]
 
|website_cn=[https://www.waveshare.net 官方中文站点]
 
|website_en=[https://www.waveshare.com/rp2040-zero.htm  Waveshare website]
 
|website_en=[https://www.waveshare.com/rp2040-zero.htm  Waveshare website]
Line 11: Line 13:
 
}}
 
}}
 
{{RP2040-Zero Spec}}
 
{{RP2040-Zero Spec}}
</div>
+
==<font color="#FF0000">Anti-piracy statement</font>==
<div class="tabbertab" title = "User Guide">
+
Many unscrupulous merchants in the market maliciously copy Waveshare products, the general characteristics of these unscrupulous merchants are:<br/>
 +
#Copying web page descriptions, product pictures, and product information.
 +
#The use of poor components, the light operation is not stable, and <font color="#FF0000"> may appear short circuit, equipment burned, and other phenomena (to avoid your property losses, please beware of piracy).</font>
 +
#Do not pay attention to product quality, no ability to deal with after-sales. (We not only produce excellent quality boards but also provide a strong after-sales team to protect your products and works).
 +
*Recognize Waveshare genuine products, we have the following characteristics in terms of configuration and appearance:
 +
#With Waveshare LOGO ([https://files.waveshare.com/upload/c/c3/Waveshare-TMark.jpg certificate]).
 +
#Immersion gold process (only some models, see product description).
 +
<!--
 
==Notice==
 
==Notice==
 
RP2040-Zero uses the same RP2040 chip as the Raspberry Pi Pico, and it is compatible with the Raspberry Pi Pico, in this case, most of the accessories and codes can be used with the RP2040-LCD-0.96 as well.
 
RP2040-Zero uses the same RP2040 chip as the Raspberry Pi Pico, and it is compatible with the Raspberry Pi Pico, in this case, most of the accessories and codes can be used with the RP2040-LCD-0.96 as well.
 
{{Pico Start Kit Guides}}
 
{{Pico Start Kit Guides}}
</div>
+
-->
<div class="tabbertab" title="Resources">
+
{{Raspberry Pi Pico Resources}}
 
==Documents==
 
==Documents==
*[https://www.waveshare.com/w/upload/4/4c/RP2040_Zero.pdf Schematic of RP2040-Zero]
+
*[https://files.waveshare.com/upload/4/4c/RP2040_Zero.pdf Schematic of RP2040-Zero]
*[https://www.waveshare.com/w/upload/f/f7/RP2040_Zero_stp.zip 3D drawing of the board]
+
*[https://files.waveshare.com/upload/f/f7/RP2040_Zero_stp.zip 3D drawing of the board]
{{Raspberry Pi Pico Resources}}
 
 
==Demo Codes==
 
==Demo Codes==
 
*[[:File:Raspberry_Pi_Pico_MicroPython_Demo_Code.7z|Demo codes for Raspberry-Pi-Pico-Basic-Kit]]
 
*[[:File:Raspberry_Pi_Pico_MicroPython_Demo_Code.7z|Demo codes for Raspberry-Pi-Pico-Basic-Kit]]
*[https://www.waveshare.com/w/upload/5/5e/Raspberry-Pi-Pico-Sensor-Kit.zip Demo codes for Raspberry Pi Pico Sensor Kit]
+
*[https://files.waveshare.com/upload/5/5e/Raspberry-Pi-Pico-Sensor-Kit.zip Demo codes for Raspberry Pi Pico Sensor Kit]
</div>
+
*[https://files.waveshare.com/upload/5/58/RP2040-Zero.zip WS2812B Test Codes]
<div class="tabbertab" title="FAQ">
+
==Example Project Shared by Users==
 
+
*[https://github.com/Alwinator/JustUSB JustUSB project by Alwin]
</div>
+
=FAQ=
 +
{{FAQ|How do I debug this design when the debugger pins are not brought out?
 +
|
 +
Debugging is not possible. You can program on a board that can be debugged and then directly burn the firmware into the RP2040 Zero.
 +
||}}
 +
{{FAQ| Why does my disk disappear when I put files into it, and upon re-entering the disk, I don't see the previously added files?
 +
|
 +
The Bootrom of RP2040 provides a standard USB bootloader that identifies as a writable drive for copying code onto the RP2040 using UF2 files. UF2 files copied onto the drive are downloaded and written into Flash or RAM, and the device is automatically restarted, enabling code download and execution on the RP2040 using just a USB connection.<br>
 +
Any type of file can be written to the USB drive from the host, but typically these files are not stored—they appear this way due to caching on the host side. Only when a UF2 file is written to the device is special content recognized, and the data is written to the specified location in RAM or Flash. After downloading the complete and valid UF2 file, the RP2040 will automatically reboot to run the newly downloaded code.<br>
 +
UF2 files aren't stored; they are burned into designated locations based on the corresponding file format. For specific file formats, refer to the open-source project by Microsoft at https://github.com/microsoft/uf2.
 +
||}}
 +
{{FAQ|How to program the firmware?
 +
|
 +
Press RESET first, then press BOOT; release RESET first, then release BOOT to enter programming mode. You can drag and drop or copy the firmware into this mode for flashing.
 +
||}}
 +
{{FAQ|Is there any way to connect a battery pack to the WS RP2040-Zero using GPIO pins or anything else?
 +
|
 +
The VSYS pin of the RP2040 is connected to the VUSB pin directly in RP2040-zero (named Pin23 ), If you want to connect the battery directly to the VSYS pin, you need to add a diode to avoid backflow. You can also directly connect the battery to Pin 21 (the 3V3) of the RP2040-zero if the voltage of the battery is 3.3V.<br>
 +
RP2040 zero itself has no battery protection function, you need to ensure that your battery will not be overcharged or over-discharged, causing safety accidents.
 +
||}}
 +
{{FAQ|Is that none of the debugging pins are exposed for SWD debugging?
 +
|
 +
This board doesn't pin out the SWD pins.
 +
||}}
 +
{{FAQ|Any advice on using the RP2040-Zero in USB host mode? For the pico, it recommends an OTG cable but since the RP2040-Zero has a USB-C connector there is no sense of pin?
 +
|
 +
Just use an OTG adapter like this or use a C2C cable:<br>
 +
[[File:RP2040-Zero-FAQ05.png]]
 +
||}}
 +
{{FAQ|What is the spacing on the 10 pads underneath the RP2040-Zero?<br>
 +
[[File:RP2040-Zero-FAQ01.png]]
 +
|
 +
Please check this:<br>
 +
[[File:RP2040-Zero-FAQ02.png|300px]]
 +
||}}
 +
{{FAQ|In P2040-Zero to which pin must the 5V input voltage must be given to power up the board?
 +
|
 +
If you do not use USB for power supply, you can use the 5V pin for power supply:<br>
 +
[[File:RP2040-zero-09.png|400px]]
 +
||}}
 +
{{FAQ|I want to power RP2040-Zero using 1s lipo battery.. can I connect the battery directly to the 5v pin mentioned in the pinout document?
 +
|
 +
Due to the limited space, the power management part is omitted, resulting in zero can only be powered by 5V/3.3V. But zero itself has no battery protection function, you need to ensure that your battery will not be overcharged or over-discharged, which will cause safety accidents.
 +
||}}
  
<div class="tabbertab" title="Support"><br />{{Service00}}</div>
+
=Support=
 +
{{Servicebox1}}
 
</div>
 
</div>

Latest revision as of 07:29, 22 April 2024

RP2040-Zero
RP2040-Zero-1.jpg
with pre-soldered pin header
RP2040-Zero-M-1.jpg
{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

RP2040-Zero, A Low-Cost, High-Performance Pico-Like MCU Board Based On Raspberry Pi Microcontroller RP2040.

Specification

  • RP2040 microcontroller chip designed by Raspberry Pi in the United Kingdom.
  • Dual-core Arm Cortex M0+ processor, flexible clock running up to 133 MHz.
  • 264KB of SRAM, and 2MB of on-board Flash memory.
  • USB-C connector, keeps it up to date, easier to use.
  • The castellated module allows soldering direct to carrier boards.
  • USB 1.1 with device and host support.
  • Low-power sleep and dormant modes.
  • Drag-and-drop programming using mass storage over USB.
  • 29 × multi-function GPIO pins (20× via edge pinout, others via solder points).
  • 2 × SPI, 2 × I2C, 2 × UART, 4 × 12-bit ADC, 16 × controllable PWM channels.
  • Accurate clock and timer on-chip.
  • Temperature sensor.
  • Accelerated floating-point libraries on-chip.
  • 8 × Programmable I/O (PIO) state machines for custom peripheral support.

Pinouts

RP2040-Zero-details-7.jpg

Dimension

RP2040-Zero-details-size.jpg

Anti-piracy statement

Many unscrupulous merchants in the market maliciously copy Waveshare products, the general characteristics of these unscrupulous merchants are:

  1. Copying web page descriptions, product pictures, and product information.
  2. The use of poor components, the light operation is not stable, and may appear short circuit, equipment burned, and other phenomena (to avoid your property losses, please beware of piracy).
  3. Do not pay attention to product quality, no ability to deal with after-sales. (We not only produce excellent quality boards but also provide a strong after-sales team to protect your products and works).
  • Recognize Waveshare genuine products, we have the following characteristics in terms of configuration and appearance:
  1. With Waveshare LOGO (certificate).
  2. Immersion gold process (only some models, see product description).

Pico Quick Start

Download Firmware

  • MicroPython Firmware Download

MicroPython Firmware Download.gif

  • C_Blink Firmware Download

C Blink Download.gif

Video Tutorial

  • Pico Tutorial I - Basic Introduction

  • Pico Tutorial II - GPIO

  • Pico Tutorial III - PWM

  • Pico Tutorial IV - ADC

  • Pico Tutorial V - UART

  • Pico Tutorial VI - To be continued...

MicroPython Series

C/C++ Series

Arduino IDE Series

Install Arduino IDE

  1. Download the Arduino IDE installation package from Arduino website.
    RoArm-M1 Tutorial II01.jpg
  2. Just click on "JUST DOWNLOAD".
    Arduino IDE Pico.png
  3. Click to install after downloading.
    RoArm-M1 Tutorial II02.gif
  4. Note: You will be prompted to install the driver during the installation process, we can click Install.

Install Arduino-Pico Core on Arduino IDE

  1. Open Arduino IDE, click the File on the left corner and choose "Preferences".
    RoArm-M1 Tutorial04.jpg
  2. Add the following link in the additional development board manager URL, then click OK.
    https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

    RoArm-M1 Tutorial II05.jpg
    Note: If you already have the ESP8266 board URL, you can separate the URLs with commas like this:

    https://dl.espressif.com/dl/package_esp32_index.json,https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
    
  3. Click on Tools -> Dev Board -> Dev Board Manager -> Search for pico, it shows installed since my computer has already installed it.
    Pico Get Start 05.png
    Pico Get Start 06.png

Upload Demo At the First Time

  1. Press and hold the BOOTSET button on the Pico board, connect the Pico to the USB port of the computer via the Micro USB cable, and release the button when the computer recognizes a removable hard drive (RPI-RP2).
    Pico Get Start.gif
  2. Download the demo, open arduino\PWM\D1-LED path under the D1-LED.ino.
  3. Click Tools -> Port, remember the existing COM, do not need to click this COM (different computers show different COM, remember the existing COM on your computer).
    UGV1 doenload02EN.png
  4. Connect the driver board to the computer with a USB cable, then click Tools -> Ports, select uf2 Board for the first connection, and after the upload is complete, connecting again will result in an additional COM port.
    UGV1 doenload03EN.png
  5. Click Tool -> Dev Board -> Raspberry Pi Pico/RP2040 -> Raspberry Pi Pico.
    Pico Get Start02.png
  6. After setting, click the right arrow to upload.
    Pico Get Start03.png
    • If you encounter problems during the period, you need to reinstall or replace the Arduino IDE version, uninstall the Arduino IDE needs to be uninstalled cleanly, after uninstalling the software you need to manually delete all the contents of the folder C:\Users\[name]\AppData\Local\Arduino15 (you need to show the hidden files in order to see it) and then reinstall.


Open Source Demo

Resource

Example Demo

Official Document

Pico W

Firmware

Pico

User Manual

Schematic & Datasheet

Related Books

Raspberry Pi Open-source Demo

Development Software

Documents

Demo Codes

Example Project Shared by Users

FAQ

 Answer:

Debugging is not possible. You can program on a board that can be debugged and then directly burn the firmware into the RP2040 Zero.

{{{5}}}


 Answer:

The Bootrom of RP2040 provides a standard USB bootloader that identifies as a writable drive for copying code onto the RP2040 using UF2 files. UF2 files copied onto the drive are downloaded and written into Flash or RAM, and the device is automatically restarted, enabling code download and execution on the RP2040 using just a USB connection.
Any type of file can be written to the USB drive from the host, but typically these files are not stored—they appear this way due to caching on the host side. Only when a UF2 file is written to the device is special content recognized, and the data is written to the specified location in RAM or Flash. After downloading the complete and valid UF2 file, the RP2040 will automatically reboot to run the newly downloaded code.
UF2 files aren't stored; they are burned into designated locations based on the corresponding file format. For specific file formats, refer to the open-source project by Microsoft at https://github.com/microsoft/uf2.

{{{5}}}


 Answer:

Press RESET first, then press BOOT; release RESET first, then release BOOT to enter programming mode. You can drag and drop or copy the firmware into this mode for flashing.

{{{5}}}


 Answer:

The VSYS pin of the RP2040 is connected to the VUSB pin directly in RP2040-zero (named Pin23 ), If you want to connect the battery directly to the VSYS pin, you need to add a diode to avoid backflow. You can also directly connect the battery to Pin 21 (the 3V3) of the RP2040-zero if the voltage of the battery is 3.3V.
RP2040 zero itself has no battery protection function, you need to ensure that your battery will not be overcharged or over-discharged, causing safety accidents.

{{{5}}}


 Answer:

This board doesn't pin out the SWD pins.

{{{5}}}




 Answer:

If you do not use USB for power supply, you can use the 5V pin for power supply:
RP2040-zero-09.png

{{{5}}}


 Answer:

Due to the limited space, the power management part is omitted, resulting in zero can only be powered by 5V/3.3V. But zero itself has no battery protection function, you need to ensure that your battery will not be overcharged or over-discharged, which will cause safety accidents.

{{{5}}}


Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 AM GMT+8 (Monday to Friday)