Datasheet

Chapter 3. Applications information
3.1. Programming the flash
The on-board 2MB QSPI flash can be (re)programmed either using the serial wire debug port or by the special USB mass
storage device mode.
The simplest way to reprogram the Pico W’s flash is to use the USB mode. To do this, power-down the board, then hold
the BOOTSEL button down during board power-up (e.g. hold BOOTSEL down while connecting the USB). The Pico W will
then appear as a USB mass storage device. Dragging a special '.uf2' file onto the disk will write this file to the flash and
restart the Pico W .
The USB boot code is stored in ROM on RP2040, so can not be accidentally overwritten.
To get started using the SWD port see the Debugging with SWD section in the Getting started with Raspberry Pi Pico
book.
3.2. General purpose I/O
The Pico W’s GPIO is powered from the on-board 3.3V rail, and is fixed at 3.3V.
Pico W exposes 26 of the 30 possible RP2040 GPIO pins by routing them straight out to Pico W header pins. GPIO0 to
GPIO22 are digital only, and GPIO 26-28 can be used either as digital GPIO or as ADC inputs (software selectable).
GPIO 26-29 are ADC-capable and have an internal reverse diode to the VDDIO (3.3V) rail, so the input voltage must not
exceed VDDIO plus about 300mV. If the RP2040 is unpowered, applying a voltage to these GPIO pins will 'leak' through
the diode into the VDDIO rail. GPIO pins 0-25 (and the debug pins) do not have this restriction and therefore voltage can
safely be applied to these pins when RP2040 is unpowered up to 3.3V.
3.3. Using the ADC
The RP2040 ADC does not have an on-chip reference; it uses its own power supply as a reference. On Pico W the
ADC_AVDD pin (the ADC supply) is generated from the SMPS 3.3V by using an R-C filter (201Ω into 2.2μF).
1. This solution relies on the 3.3V SMPS output accuracy
2. Some PSU noise will not be filtered
3. The ADC draws current (about 150μA if the temperature sense diode is disabled, which can vary between chips);
there will be an inherent offset of about 150μA*200 = ~30mV. There is a small difference in current draw when the
ADC is sampling (about +20μA), so that offset will also vary with sampling as well as operating temperature.
Changing the resistance between the ADC_VREF and 3.3V pin can reduce the offset at the expense of more noise, which
is helpful if the use case can support averaging over multiple samples.
Driving the SMPS mode pin (WL_GPIO1) high forces the power supply into PWM mode. This can greatly reduce the
inherent ripple of the SMPS at light load, and therefore reduces the ripple on the ADC supply. This does reduce the
power efficiency of the Pico W at light load, so at the end of an ADC conversation PFM mode can be re-enabled by
driving WIFI_GPIO1 low once more. See Section 3.4.
The ADC offset can be reduced by tying a second channel of the ADC to ground, and using this zero measurement as an
approximation to the offset.
For much improved ADC performance, an external 3.0V shunt reference, such as LM4040, can be connected from the
ADC_VREF pin to ground. Note that if doing this the ADC range is limited to 0V - 3.0V signals (rather than 0V - 3.3V), and
Raspberry Pi Pico W Datasheet
3.1. Programming the flash 11