This is only a preview of the December 2024 issue of Silicon Chip. You can view 40 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Capacitor Discharger":
Articles in this series:
Items relevant to "Compact HiFi Headphone Amp":
Articles in this series:
Items relevant to "WiFi weather logger":
Items relevant to "The Pico Computer":
Items relevant to "Variable Speed Drive Mk2, Part 2":
Purchase a printed copy of this issue for $13.00. |
Raspberry Pi
Pico 2
Review by Tim Blythman
T
he new Raspberry Pi Pico 2 microcontroller board was released in
August this year. We have reviewed
the new Raspberry Pi 5 single-board
computer (SBC) in the July 2024 issue
(siliconchip.au/Article/16323).
The original Pico was released in
2021, followed by the WiFi and Bluetooth equipped Pico W in 2022. Both
these boards are based on the RP2040
microcontroller, the first microcontroller designed by the Raspberry Pi Foundation. The Raspberry Pi 5 introduced
the RP1 microcontroller, acting as an
I/O controller.
Like the Raspberry Pi SBCs, the Pico
was designed to be low cost and easy
to use, with a target price of US$4
(about $6). By the time we reviewed
The last 12 months saw the release of the
Raspberry Pi 5 single-board computer (SBC)
and Raspberry Pi Ltd being listed on the
London Stock Exchange. Most interesting for
us was the recent release of the Raspberry
Pi Pico 2 microcontroller board with the new
RP2350 microcontroller.
it, it could be programmed in the C
language, with the Arduino IDE and
MicroPython; PicoMite BASIC was
released soon afterwards (December
2021; siliconchip.au/Article/15125).
About a year later, the Pico W was
released. It shares the same form factor
and processor as the Pico but includes
an Infineon CYW43439 radio module,
adding WiFi and Bluetooth support.
The bare RP2040 microcontroller
later became available for purchase
at around one dollar, from the likes
of DigiKey and Mouser. That led to
its incorporation into many thirdparty boards.
At Silicon Chip, we created the Pico
BackPack, which adds features like an
LCD touchscreen, microSD card socket
and audio output to a Pico or Pico
W. That was detailed in the March
2022 issue (siliconchip.au/
Article/15236), with the Pico
W BackPack introduced in
January 2023 (siliconchip.au/
Article/15616).
We have used the Pico and
Pico W in various projects,
including the VGA PicoMite,
WebMite, Pico Audio Analyser
and Pico Gamer. So we were very interested to see what the Pico 2 has to offer.
There are a lot of similarities; it has
the same layout and footprint as the
Pico & Pico W. Apart from the silkscreen being marked as a Pico 2, you
might not even know it was a different
board! It appears the Pico 2 is backwards compatible with the Pico; we
shall investigate that later.
The Pico 2 is aimed to be available
for US$5, and we purchased our test
boards for about $8 (excluding delivery), which is much the same price at
the time of writing.
The RP2350
The new RP2350 microcontroller is
actually a series of four new parts; it
is the RP2350A variant that is fitted to
the Pico 2. Table 1 shows a comparison
between the RP2040 and the members
of the RP2350 family.
Like their respective microcontroller boards, there is a lot of similarity
between the RP2040 and the RP2350.
The two important differences are in
the processor and the inbuilt RAM;
these explain the differences between
the part numbers.
The Pico 2 (left) looks very similar to
the Pico (right). The notable
differences are in
the silkscreen and
that the Pico 2 uses
smaller passives.
The different core
power supply is visible
in the components
above and to the right of
the RP2350. The larger
component in that area is an inductor that’s used in the switching mode of
the RP2350 core supply.
62
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
The RP2350 has a dual ARM Cortex M33 processor compared to the
RP2040’s dual ARM Cortex M0+
(hence the ‘3’ in RP2350), while the
‘5’ indicates that it has twice as much
RAM (see Fig.1). Its data sheet can be
found at siliconchip.au/link/ac1u
The QSPI controller (which is used
to communicate with an external flash
memory chip) has been provided with
a second interface. This can be used
to connect a second flash chip or a
PSRAM (pseudo-static random access
memory), to expand the memory available to the system.
8MiB (64Mbit) PSRAM chips are
available for a few dollars. That is a
phenomenal amount of RAM for a
microcontroller, but note that the Pico
2 board does not have provision for a
PSRAM chip to be fitted.
The RP2350 also has a dual Hazard3 RISC-V (pronounced ‘risk five’)
processor that can be selected at boot
time. RISC-V is an open RISC (reduced
instruction set computer) architecture
that is gaining traction as an alternative to other proprietary architectures.
In theory, one core can be a RISC-V
processor and the other, an ARM processor.
The new M33 ARM processor has
native floating-point instructions that
the M0+ processor in the RP2040 lacks;
floating-point support for the RP2040
is provided by software routines in
ROM. That means a big uplift in performance when performing floating-point
calculations.
The M33 also includes Arm TrustZone and secure boot, using an OTP
(one-time programmable) memory
to store an encryption key. The M33
processor also performs better (at the
same processor clock speed) than the
M0+ in tests such as the Dhrystone
benchmarks. The security features are
not available when the RISC-V cores
are used.
The RP2350 has a nominal maximum clock speed of 150MHz, although
we have already read reports that it
can be overclocked (much like the
RP2040). There are reports of operation up to 300MHz. Such overclocking is also subject to the limits of the
flash memory chip.
Two of the RP2350 variants boast a
larger chip with more I/O pins; those
have the ‘B’ suffix. These have 48
general-purpose I/O pins, compared to
just 30 on the RP2040 and ‘A’ variants.
Then there are the RP2354 variants,
siliconchip.com.au
Table 1 – RP2040 and RP2350 family comparison
RP2040
RP2350A
RP2350B
Dual ARM
Cortex M0+
Dual ARM Cortex M33 and Hazard3 RISC-V
External only
RP2354A RP2354B
2MiB internal
Processor
(CPU)
Flash memory
264kiB
520kiB plus external PSRAM
RAM
133MHz
150MHz
Clock
56
60
80
60
80
Pins
30
30
48
30
48
GPIO
2
UART
2
SPI
2
I2C
16
24
4
4
PWM
8
4
8
ADC channels
Full-speed host or device
USB
8
12
PIO state
machines
–
HSTX peripheral, secure boot with OTP
storage, hardware random number generator
Other
which bond a 2MiB (16Mbit) Winbond W25Q16JVWI QSPI NOR flash
memory chip to the RP2350 processor die; this die is otherwise identical
to a bare RP2350A or RP2350B chip.
Thus, the four variants of the RP2350
are the 60-pin ‘A’ versions and 80-pin
‘B’ versions, either with (RP2354) or
without (RP2350) an attached flash
memory chip.
Having only four ADC (analog-todigital converter) channels on the
RP2040 saw the Pico falling short compared to many other microcontrollers’
analog abilities. The larger RP2350B
variants now have eight ADC channels, which means that the Pico 2 is
still stuck with only four channels.
During our development of the
Pico Audio Analyser (November 2023
issue; siliconchip.au/Article/16011),
we looked closely at some errors that
had been identified in the ADC silicon
Fig.1: the part naming of the RP2350
(and RP2040) is based on this scheme.
The RP2354 parts have 2MiB (24 ×
128kB) of non-volatile storage in the
form of a flash memory chip bonded
to the processor die.
Australia's electronics magazine
hardware of the RP2040. The RP2350
data sheet indicates that those have
been fixed in the newer chip.
The novel PIO (programmable input
output) peripheral saw a lot of attention, and has been put to good use in
emulating all sorts of peripheral functions. That includes SPI, USB and even
the protocol that is used to control
WS2812 programmable LEDs.
We used the PIO to generate digital
video in the Pico Digital Video Terminal (March & April 2024; siliconchip.
au/Series/413). The RP2350 provides
12 PIO state machines, up from the
RP2040’s eight. There are also some
minor updates to the PIO peripheral
itself.
The RP2350 also has a new HSTX
peripheral; this stands for ‘high-speed
serial transmit’. It can stream data out
on eight I/O pins at up to 300MHz
(using double-data-rate output registers). There is example code to use
the HSTX to generate DVI-compatible
video.
The RP2350 data sheet notes that
each processor core implements a
TMDS (transition minimised differential signalling) encoding algorithm.
TMDS is an encoding used with HDMI
and DVI video, so clearly there is an
intention for the RP2350 to be able to
directly produce video output.
Power management on the RP2350
has been improved by splitting the
power domains and allowing some
December 2024 63
1
2
39
USB
BOOTSEL
LED
Fig.3: an easy way to tell the Pico
from the Pico 2 is the drive volume
label displayed by the bootloader.
The RP2350 label indicates that it’s a
Pico 2. A Pico or other RP2040-based
board would show this as RPI-RP2.
DEBUG
parts to be selectively powered off,
thus potentially using less power than
the RP2040 in sleep mode.
The Pico 2
Unsurprisingly, the biggest difference between the Pico and Pico 2 is
the new processor chip. As well as
doubling the RAM, the Pico 2 has double the available flash memory, with
a 4MiB (32Mbit) flash memory chip
onboard. The data sheet for the Pico 2
can be downloaded from siliconchip.
au/link/ac1v
That’s about the extent of the
changes between the two boards. The
same RT6150 buck/boost regulator
allows the Pico 2 to operate from anywhere between 1.8V and 5.5V. Similar
to the Pico, the Pico 2 also has a diode
between the VBUS and VSYS pins.
The Pico 2 appears to use smaller
passive components, and there is some
extra circuitry related to the RP2350’s
core 1.1V power supply, which has a
regulator that can operate in both linear and switching modes, allowing it
to achieve better efficiency.
The rear of the Pico 2 has test points
in the same place as the Pico, with the
addition of an extra test point in the
area of the switching regulator’s circuitry. Otherwise, a 2024 copyright
notice is the most prominent difference.
From what we can see, there isn’t
even a new pinout diagram for the Pico
2; the Pico diagram has simply been
annotated to include the Pico 2. So it
appears that there are no electrical or
mechanical reasons that rule out using
a Pico 2 in place of a Pico.
64
Silicon Chip
Fig.2: the Pico and Pico 2 share
this pinout diagram, meaning
that I/O and peripheral mappings
are identical. The new HSTX
peripheral is not shown; it uses
the GP12-GP19 pins of the Pico 2.
Source: www.raspberrypi.com/
documentation/microcontrollers/
pico-series.html
Fig.2 shows the pinout. It does not
note the HSTX-capable pins, presumably to retain the consistency between
the Pico and Pico 2 diagrams. The
HSTX pins are fixed to GPIOs 12-19.
A fault in the silicon
While the Pico 2 may appear to be
better in all ways than the Pico, there
is already a severe erratum that can
probably only be fixed by a revision
of the RP2350 silicon. The data sheet
notes this as erratum RP2350-E9, and
it applies to stepping A2; this is the
marking on our Pico 2.
An excessive leakage current is
sourced from a digital input pin if its
voltage is in the undefined input voltage region, between valid high and
low levels.
When connected to a high impedance source, this could result in erroneous readings. It is especially a problem if the internal pull-down is active,
since the weak pull-down cannot overcome the leakage and the pin remains
stuck in the undefined input voltage
region (around 2.2V for a 3.3V supply).
Software fixes can be applied to
some but not all situations. The general advice is to use an external pulldown resistor of no more than 8.2kW
instead of the internal pull-down
when required.
The good news is that the bug that
caused poor ADC performance in the
RP2040 is fixed in the RP2350.
Security
We aren’t surprised that security
was a low priority for the Raspberry
Pi Foundation in creating a cheap and
Australia's electronics magazine
easy to use board in the Pico. The Arm
TrustZone and secure boot features of
the RP2350 intend to address one of
the claimed weaknesses of the RP2040:
a lack of security for the program flash
memory.
For example, reading or modifying the program in the flash chip (on
the original Pico) would be as easy as
accessing the flash chip and performing read or write commands.
The security on the RP2350 depends
on the flash memory contents being
encrypted and signed. The encryption means that the data stored on the
chip is meaningless until the processor decrypts it. The signing process is
a way to tell if the data has been modified, and generally involves creating a
hash or checksum of the data that can
indicate if it has been changed.
The signing is necessary as the
encryption only means that the data
cannot be easily read. It would still
be possible, for example, to write random data to the flash chip in the hope
of provoking insecure behaviour. The
signing prevents any modified data
from being run.
The OTP (one-time-programmable)
memory of the RP2350 can be used to
store the keys needed to decrypt and
check flash data, among other things.
The OTP can be locked and hidden by
programming specific bits.
To test the security, the Raspberry
Pi Foundation launched a competition with a $20,000 prize to see if
anyone can break into the locked OTP
memory. The competition is available
at https://github.com/raspberrypi/
rp2350_hacking_challenge
siliconchip.com.au
Photos 1-4 (left-to-right):
» the Seeed Technology XIAO RP2350 is one of the smaller RP2350 boards and has a USB-C socket. It appears that it
will not cost much more than a Pico 2.
» Pimoroni’s PGA2350 RP2350B is a compact but comprehensive breakout board for the 80-pin RP2350B. It includes
16MiB of flash memory and an 8MiB PSRAM chip.
» the Pimoroni Tiny 2350 appears to be pin-compatible with their Tiny 2040. We noted the Tiny 2040 in our original
review of the Pico; it was one of the early RP2040 boards.
» Sparkfun’s Pro Micro RP2350 has a USB-C socket and incorporates a PSRAM chip, giving access to over 8MiB of
random access memory. It also has a 16MiB flash memory chip.
One of the great features of the
RP2040 on the original Pico is the ROM
bootloader, which makes it almost
impossible to ‘brick’. The OTP provides a means to permanently modify
the RP2350’s behaviour, so it’s possible that a wrong OTP operation could
brick the RP2350. However, we understand that has been deliberately made
difficult to do.
Hands-on testing
We are in the process of doing some
detailed testing of the Pico 2 with our
previous Pico projects, including the
Pico Audio Analyser, which should
hopefully improve its performance.
To summarise what we’ve found,
the Pico 2 works just about seamlessly
in all cases where we had previously
used a Pico! Of course, the differing
architectures mean that code recompilation is required, but we generally
have not had to make any changes to
the code itself.
For example, we fitted a Pico 2 to
the prototype for our Pico Computer
project (see page 66) and compiled the
exact same Arduino sketch files (without any changes whatsoever) and the
Pico 2 worked exactly as expected.
Similarly, the example MicroPython
program and libraries that we created
for the BackPack worked without any
changes on the Pico 2.
The process for setting up the
Pico-series C SDK (software development kit) on a Windows machine has
changed substantially. Still, apart from
that, we had little trouble in compiling the exact same code as we used
with a Pico.
siliconchip.com.au
With just one click, we were able
to create a separate project to use
the RISC-V processor (instead of the
ARM processor) and that too compiled flawlessly and worked identically. Curiously, the compiled
RISC-V code is about half the size
of the ARM code.
We’ve also seen early versions
of PicoMite BASIC for the RP2350.
Downloads and a discussion can be
found on TheBackShed Forum, see
siliconchip.au/link/ac1w
It looks like we will soon see new
features in PicoMite BASIC. There
is an HDMI video version, using the
HSTX peripheral (in addition to VGA),
and PicoMite BASIC has been bumped
to version 6.0.0.
For more background on setting up
the Pico-series C SDK, trying out the
various PicoMite BASIC RP2350 versions and porting our various projects
to use the Pico 2. We plan to publish
another article in the near future.
What about a Pico 2 W?
The launch announcement of the
Pico 2 (siliconchip.au/link/ac1i)
offered some hints on the availability of a WiFi version, as well as bare
RP2350 chips. At this stage, it appears
the Pico 2 W will feature the same
Infineon CYW43439 radio module
and should be available before the
end of 2024.
Bare RP2350 chips in all four variants are also expected to be available
by the end of the year. DigiKey and
Mouser already stock the RP2040 chip
at just over $1, so we would not be surprised to see them carrying the RP2350
Australia's electronics magazine
variants in the near future, presumably
at a slightly higher price.
Other RP2350 boards
Other companies have already
announced RP2350-based products. It
appears some firms have had access to
the RP2350 for some time before the
launch, allowing them to develop a
range of products, test out the chips
and their software.
It was the makers of the Bus Pirate
(https://buspirate.com) who identified
the erratum mentioned earlier. Bus
Pirate is an open-source digital tool
for working with microcontrollers and
other digital ICs.
Photos 1-4 show some of the new
boards that have been announced. At
the time of writing, we have not seen
any of these boards available to purchase.
Conclusion
The Pico 2 looks to be just about
better than the Pico in every way, as
long you can avoid the leakage current problem.
The extra RAM and improved ADC
would definitely have been beneficial
for our Pico Audio Analyser project
had the Pico 2 been available when
we were designing it.
While it might appear that the Pico 2
could easily obsolete the Pico, there is
a note on the Pico’s product page that
it will be available until January 2036.
The Pico 2 is similarly noted as being
available until January 2040.
Subject to stock levels and demand,
the Pico 2 is available from Altronics,
DigiKey and Mouser.
SC
December 2024 65
|