Raspberry Pi Pico LCD Shields
This is a collection of very versatile displays due to its different resolutions and sizes, the RGB capabilities and additional buttons and joystick. Nearly all displays comes with a special LCD controller wired over SPI up to the Raspberry Pi Pico. Additional momentary push buttons or joysticks are wired up over simple GPIO lines. Some shield provide also a TF/SD-card slot, wired over a second dedicated SPI bus.
Supported Shields
Hardware
Features and Resources |
Printed Circuit Board |
5V/40㎃ A B UP|DOWN|LEFT|RIGHT|ENTER LCD 12 1 1
Design Data |
![]() |
Features and Resources |
Printed Circuit Board |
5V/40㎃ 0 1 2 3 LCD 9 1 1
Design Data |
![]() |
Additional there are a resistive Touch Screen (TS) with the TS controller XPT2046 [20] and a standard TF/microSD card slot. The board is prepared for retrofitting the JEDEC compliant Pseudo-Static RAM (PSRAM) chip, e.g. the ESP-PSRAM64H [26] by Espressif, which is also connected to the SPI.
Features and Resources |
Printed Circuit Board |
5V/40㎃ LCD/TSC TF/microSD 9 1 1 1 1
Design Data |
![]() |
Positions
Data Sheets
![]() |
---|
Inputs:
Outputs:
|
Data Sheets
Data Sheets
JEDEC compliant PSRAM
Above 74HC4040 (position 7) is the spare SOP8 footprint for an optional serial PSRAM, which is also connected to the SPI. Possible 3.0~3.3V types [26] are:
Pinouts
Utilization
This shields can be used with any development board, shield, or snippet that
provides a Devicetree node with the raspberrypi,pico-header-r3
property for the compatibility. In particular, the SPI1 bus and some GPIO
signals on pins 11 to 19 (20) of this edge connector must be free for
communication with the LCD on the shields. The shields also provide the special
Devicetree labels &rpipico_spi_lcd
and &lcd_panel
for this purpose.
For shields with touchscreen support, the GPIO signals on pins 21 and 22 of
the edge connector must also be free for communication with the touchscreen
controller on the shield. The shields also provide the special Devicetree
labels &rpipico_spi_tsc
and &tsc_panel
for this
purpose.
For shields with TF/microSD card slot, the GPIO signal on pin 29 of the edge
connector must also be free for communication with the card on the shield over
SDHC/SPI. The shields also provide the special Devicetree labels
&rpipico_spi_sdc
and &sdhc_spi
for this purpose.
In case of the SDHC/SDIO mode the GPIO signals on pins 7 and 24 to 29 must
be free for communication with the card over a 4-bit SDHC/SDIO interface.
But this is not yet supported and may need changes on the shield hardware.
Programming
Set -DSHIELD=waveshare_pico_lcd_1_14
and use optional the
USB Console Snippet (usb-console) when you invoke west build
.
For example:
Using west:
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_lcd_1_14-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_lcd_1_14-helloshell -GNinja -DBOARD=rpi_pico -DSHIELD="waveshare_pico_lcd_1_14" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_lcd_1_14-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h hello - say hello uart:~$ hello Hello from shell. uart:~$ hwinfo devid Length: 8 ID: 0x8c998be1de969148 uart:~$ kernel version Zephyr version 3.6.0 uart:~$ bridle version Bridle version 3.6.1 uart:~$ bridle version long Bridle version 3.6.1.0 uart:~$ bridle info Zephyr: 3.6.0 Bridle: 3.6.1 uart:~$ device list devices: - clock-controller@40008000 (READY) - reset-controller@4000c000 (READY) - snippet_cdc_acm_console_uart (READY) - uart@40034000 (READY) - timer@40054000 (READY) - gpio@40014000 (READY) - adc@4004c000 (READY) - flash-controller@18000000 (READY) - i2c@40044000 (READY) - vreg@40064000 (READY) - lcd-backlight-en (READY) - leds (READY) uart:~$ history [ 0] history [ 1] device list [ 2] bridle info [ 3] bridle version long [ 4] bridle version [ 5] kernel version [ 6] hwinfo devid [ 7] hello [ 8] hello -h
Operate with the LCD backlight LED LCD_BL at GP13:
uart:~$ regulator disable lcd-backlight-en uart:~$ regulator enable lcd-backlight-en
Operate with the joystick button ENTER at GP3:
uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio conf gpio@40014000 3 iul uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio get gpio@40014000 3 1 uart:~$ gpio get gpio@40014000 3 0
Using west:
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_lcd_1_14-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_lcd_1_14-helloshell -GNinja -DBOARD=rpi_pico_w -DSHIELD="waveshare_pico_lcd_1_14" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_lcd_1_14-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h hello - say hello uart:~$ hello Hello from shell. uart:~$ hwinfo devid Length: 8 ID: 0x8c998be1de969148 uart:~$ kernel version Zephyr version 3.6.0 uart:~$ bridle version Bridle version 3.6.1 uart:~$ bridle version long Bridle version 3.6.1.0 uart:~$ bridle info Zephyr: 3.6.0 Bridle: 3.6.1 uart:~$ device list devices: - clock-controller@40008000 (READY) - reset-controller@4000c000 (READY) - snippet_cdc_acm_console_uart (READY) - uart@40034000 (READY) - timer@40054000 (READY) - gpio@40014000 (READY) - adc@4004c000 (READY) - flash-controller@18000000 (READY) - i2c@40044000 (READY) - vreg@40064000 (READY) - lcd-backlight-en (READY) - leds (READY) uart:~$ history [ 0] history [ 1] device list [ 2] bridle info [ 3] bridle version long [ 4] bridle version [ 5] kernel version [ 6] hwinfo devid [ 7] hello [ 8] hello -h
Operate with the LCD backlight LED LCD_BL at GP13:
uart:~$ regulator disable lcd-backlight-en uart:~$ regulator enable lcd-backlight-en
Operate with the joystick button ENTER at GP3:
uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio conf gpio@40014000 3 iul uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio get gpio@40014000 3 1 uart:~$ gpio get gpio@40014000 3 0
on standard 4㎆
revision
Using west:
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_lcd_1_14-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_lcd_1_14-helloshell -GNinja -DBOARD=waveshare_rp2040_plus -DSHIELD="waveshare_pico_lcd_1_14" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_lcd_1_14-helloshell flash
on extended 16㎆
revision
Using west:
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_lcd_1_14-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_lcd_1_14-helloshell -GNinja -DBOARD=waveshare_rp2040_plus@16mb -DSHIELD="waveshare_pico_lcd_1_14" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_lcd_1_14-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h hello - say hello uart:~$ hello Hello from shell. uart:~$ hwinfo devid Length: 8 ID: 0x8c998be1de969148 uart:~$ kernel version Zephyr version 3.6.0 uart:~$ bridle version Bridle version 3.6.1 uart:~$ bridle version long Bridle version 3.6.1.0 uart:~$ bridle info Zephyr: 3.6.0 Bridle: 3.6.1 uart:~$ device list devices: - clock-controller@40008000 (READY) - reset-controller@4000c000 (READY) - snippet_cdc_acm_console_uart (READY) - uart@40034000 (READY) - timer@40054000 (READY) - gpio@40014000 (READY) - adc@4004c000 (READY) - flash-controller@18000000 (READY) - i2c@40044000 (READY) - vreg@40064000 (READY) - lcd-backlight-en (READY) - leds (READY) uart:~$ history [ 0] history [ 1] device list [ 2] bridle info [ 3] bridle version long [ 4] bridle version [ 5] kernel version [ 6] hwinfo devid [ 7] hello [ 8] hello -h
Operate with the LCD backlight LED LCD_BL at GP13:
uart:~$ regulator disable lcd-backlight-en uart:~$ regulator enable lcd-backlight-en
Operate with the joystick button ENTER at GP3:
uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio conf gpio@40014000 3 iul uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio get gpio@40014000 3 1 uart:~$ gpio get gpio@40014000 3 0
Set -DSHIELD=waveshare_pico_lcd_2
and use optional the
USB Console Snippet (usb-console) when you invoke west build
.
For example:
Using west:
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_lcd_2-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_lcd_2-helloshell -GNinja -DBOARD=rpi_pico -DSHIELD="waveshare_pico_lcd_2" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_lcd_2-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h hello - say hello uart:~$ hello Hello from shell. uart:~$ hwinfo devid Length: 8 ID: 0x8c998be1de969148 uart:~$ kernel version Zephyr version 3.6.0 uart:~$ bridle version Bridle version 3.6.1 uart:~$ bridle version long Bridle version 3.6.1.0 uart:~$ bridle info Zephyr: 3.6.0 Bridle: 3.6.1 uart:~$ device list devices: - clock-controller@40008000 (READY) - reset-controller@4000c000 (READY) - snippet_cdc_acm_console_uart (READY) - uart@40034000 (READY) - timer@40054000 (READY) - gpio@40014000 (READY) - adc@4004c000 (READY) - flash-controller@18000000 (READY) - i2c@40044000 (READY) - vreg@40064000 (READY) - lcd-backlight-en (READY) - leds (READY) uart:~$ history [ 0] history [ 1] device list [ 2] bridle info [ 3] bridle version long [ 4] bridle version [ 5] kernel version [ 6] hwinfo devid [ 7] hello [ 8] hello -h
Operate with the LCD backlight LED LCD_BL at GP13:
uart:~$ regulator disable lcd-backlight-en uart:~$ regulator enable lcd-backlight-en
Operate with the user button 3 at GP3:
uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio conf gpio@40014000 3 iul uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio get gpio@40014000 3 1 uart:~$ gpio get gpio@40014000 3 0
Using west:
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_lcd_2-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_lcd_2-helloshell -GNinja -DBOARD=rpi_pico_w -DSHIELD="waveshare_pico_lcd_2" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_lcd_2-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h hello - say hello uart:~$ hello Hello from shell. uart:~$ hwinfo devid Length: 8 ID: 0x8c998be1de969148 uart:~$ kernel version Zephyr version 3.6.0 uart:~$ bridle version Bridle version 3.6.1 uart:~$ bridle version long Bridle version 3.6.1.0 uart:~$ bridle info Zephyr: 3.6.0 Bridle: 3.6.1 uart:~$ device list devices: - clock-controller@40008000 (READY) - reset-controller@4000c000 (READY) - snippet_cdc_acm_console_uart (READY) - uart@40034000 (READY) - timer@40054000 (READY) - gpio@40014000 (READY) - adc@4004c000 (READY) - flash-controller@18000000 (READY) - i2c@40044000 (READY) - vreg@40064000 (READY) - lcd-backlight-en (READY) - leds (READY) uart:~$ history [ 0] history [ 1] device list [ 2] bridle info [ 3] bridle version long [ 4] bridle version [ 5] kernel version [ 6] hwinfo devid [ 7] hello [ 8] hello -h
Operate with the LCD backlight LED LCD_BL at GP13:
uart:~$ regulator disable lcd-backlight-en uart:~$ regulator enable lcd-backlight-en
Operate with the user button 3 at GP3:
uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio conf gpio@40014000 3 iul uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio get gpio@40014000 3 1 uart:~$ gpio get gpio@40014000 3 0
on standard 4㎆
revision
Using west:
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_lcd_2-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_lcd_2-helloshell -GNinja -DBOARD=waveshare_rp2040_plus -DSHIELD="waveshare_pico_lcd_2" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_lcd_2-helloshell flash
on extended 16㎆
revision
Using west:
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_lcd_2-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_lcd_2-helloshell -GNinja -DBOARD=waveshare_rp2040_plus@16mb -DSHIELD="waveshare_pico_lcd_2" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_lcd_2-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h hello - say hello uart:~$ hello Hello from shell. uart:~$ hwinfo devid Length: 8 ID: 0x8c998be1de969148 uart:~$ kernel version Zephyr version 3.6.0 uart:~$ bridle version Bridle version 3.6.1 uart:~$ bridle version long Bridle version 3.6.1.0 uart:~$ bridle info Zephyr: 3.6.0 Bridle: 3.6.1 uart:~$ device list devices: - clock-controller@40008000 (READY) - reset-controller@4000c000 (READY) - snippet_cdc_acm_console_uart (READY) - uart@40034000 (READY) - timer@40054000 (READY) - gpio@40014000 (READY) - adc@4004c000 (READY) - flash-controller@18000000 (READY) - i2c@40044000 (READY) - vreg@40064000 (READY) - lcd-backlight-en (READY) - leds (READY) uart:~$ history [ 0] history [ 1] device list [ 2] bridle info [ 3] bridle version long [ 4] bridle version [ 5] kernel version [ 6] hwinfo devid [ 7] hello [ 8] hello -h
Operate with the LCD backlight LED LCD_BL at GP13:
uart:~$ regulator disable lcd-backlight-en uart:~$ regulator enable lcd-backlight-en
Operate with the user button 3 at GP3:
uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio conf gpio@40014000 3 iul uart:~$ gpio get gpio@40014000 3 0 uart:~$ gpio get gpio@40014000 3 1 uart:~$ gpio get gpio@40014000 3 0
Set -DSHIELD=waveshare_pico_restouch_lcd_3_5
and use optional the
USB Console Snippet (usb-console) when you invoke west build
.
For example:
Using west:
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_restouch_lcd_3_5-helloshell -GNinja -DBOARD=rpi_pico -DSHIELD="waveshare_pico_restouch_lcd_3_5" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_restouch_lcd_3_5-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h hello - say hello uart:~$ hello Hello from shell. uart:~$ hwinfo devid Length: 8 ID: 0x8c998be1de969148 uart:~$ kernel version Zephyr version 3.6.0 uart:~$ bridle version Bridle version 3.6.1 uart:~$ bridle version long Bridle version 3.6.1.0 uart:~$ bridle info Zephyr: 3.6.0 Bridle: 3.6.1 uart:~$ device list devices: - clock-controller@40008000 (READY) - reset-controller@4000c000 (READY) - snippet_cdc_acm_console_uart (READY) - uart@40034000 (READY) - timer@40054000 (READY) - gpio@40014000 (READY) - adc@4004c000 (READY) - flash-controller@18000000 (READY) - i2c@40044000 (READY) - vreg@40064000 (READY) - lcd-backlight-en (READY) - leds (READY) uart:~$ history [ 0] history [ 1] device list [ 2] bridle info [ 3] bridle version long [ 4] bridle version [ 5] kernel version [ 6] hwinfo devid [ 7] hello [ 8] hello -h
Operate with the LCD backlight LED LCD_BL at GP13:
uart:~$ regulator disable lcd-backlight-en uart:~$ regulator enable lcd-backlight-en
Using west:
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_restouch_lcd_3_5-helloshell -GNinja -DBOARD=rpi_pico_w -DSHIELD="waveshare_pico_restouch_lcd_3_5" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_restouch_lcd_3_5-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h hello - say hello uart:~$ hello Hello from shell. uart:~$ hwinfo devid Length: 8 ID: 0x8c998be1de969148 uart:~$ kernel version Zephyr version 3.6.0 uart:~$ bridle version Bridle version 3.6.1 uart:~$ bridle version long Bridle version 3.6.1.0 uart:~$ bridle info Zephyr: 3.6.0 Bridle: 3.6.1 uart:~$ device list devices: - clock-controller@40008000 (READY) - reset-controller@4000c000 (READY) - snippet_cdc_acm_console_uart (READY) - uart@40034000 (READY) - timer@40054000 (READY) - gpio@40014000 (READY) - adc@4004c000 (READY) - flash-controller@18000000 (READY) - i2c@40044000 (READY) - vreg@40064000 (READY) - lcd-backlight-en (READY) - leds (READY) uart:~$ history [ 0] history [ 1] device list [ 2] bridle info [ 3] bridle version long [ 4] bridle version [ 5] kernel version [ 6] hwinfo devid [ 7] hello [ 8] hello -h
Operate with the LCD backlight LED LCD_BL at GP13:
uart:~$ regulator disable lcd-backlight-en uart:~$ regulator enable lcd-backlight-en
on standard 4㎆
revision
Using west:
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_restouch_lcd_3_5-helloshell -GNinja -DBOARD=waveshare_rp2040_plus -DSHIELD="waveshare_pico_restouch_lcd_3_5" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_restouch_lcd_3_5-helloshell flash
on extended 16㎆
revision
Using west:
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-helloshell bridle/samples/helloshell -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-helloshell
Using CMake and ninja:
# Use cmake to configure a Ninja-based buildsystem:
cmake -Bbuild/waveshare_pico_restouch_lcd_3_5-helloshell -GNinja -DBOARD=waveshare_rp2040_plus@16mb -DSHIELD="waveshare_pico_restouch_lcd_3_5" bridle/samples/helloshell
# Now run the build tool on the generated build system:
ninja -Cbuild/waveshare_pico_restouch_lcd_3_5-helloshell flash
Simple test execution on target
(text in bold is a command input)
uart:~$ hello -h hello - say hello uart:~$ hello Hello from shell. uart:~$ hwinfo devid Length: 8 ID: 0x8c998be1de969148 uart:~$ kernel version Zephyr version 3.6.0 uart:~$ bridle version Bridle version 3.6.1 uart:~$ bridle version long Bridle version 3.6.1.0 uart:~$ bridle info Zephyr: 3.6.0 Bridle: 3.6.1 uart:~$ device list devices: - clock-controller@40008000 (READY) - reset-controller@4000c000 (READY) - snippet_cdc_acm_console_uart (READY) - uart@40034000 (READY) - timer@40054000 (READY) - gpio@40014000 (READY) - adc@4004c000 (READY) - flash-controller@18000000 (READY) - i2c@40044000 (READY) - vreg@40064000 (READY) - lcd-backlight-en (READY) - leds (READY) uart:~$ history [ 0] history [ 1] device list [ 2] bridle info [ 3] bridle version long [ 4] bridle version [ 5] kernel version [ 6] hwinfo devid [ 7] hello [ 8] hello -h
Operate with the LCD backlight LED LCD_BL at GP13:
uart:~$ regulator disable lcd-backlight-en uart:~$ regulator enable lcd-backlight-en
More Samples
Input dump
Prints all input events as defined by the shields Devicetree. See also Zephyr sample: Input dump.
Print the input events related to the five on-shield joystick keys and two user keys using the Input subsystem API. That are:
zephyr,code = <INPUT_KEY_0>;
zephyr,code = <INPUT_KEY_1>;
zephyr,code = <INPUT_KEY_UP>;
zephyr,code = <INPUT_KEY_DOWN>;
zephyr,code = <INPUT_KEY_LEFT>;
zephyr,code = <INPUT_KEY_RIGHT>;
zephyr,code = <INPUT_KEY_ENTER>;
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_lcd_1_14-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-input_dump
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_lcd_1_14-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-input_dump
on standard 4㎆
revision
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_lcd_1_14-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-input_dump
on extended 16㎆
revision
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_lcd_1_14-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-input_dump
Simple logging output on target
***** delaying boot 4000ms (per build configuration) ***** W: BUS RESET W: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** Input sample started I: input event: dev=gpio_keys SYN type= 1 code= 11 value=1 I: input event: dev=gpio_keys SYN type= 1 code= 11 value=0 I: input event: dev=gpio_keys SYN type= 1 code= 2 value=1 I: input event: dev=gpio_keys SYN type= 1 code= 2 value=0 I: input event: dev=gpio_keys SYN type= 1 code=103 value=1 I: input event: dev=gpio_keys SYN type= 1 code=103 value=0 I: input event: dev=gpio_keys SYN type= 1 code=108 value=1 I: input event: dev=gpio_keys SYN type= 1 code=108 value=0 I: input event: dev=gpio_keys SYN type= 1 code=105 value=1 I: input event: dev=gpio_keys SYN type= 1 code=105 value=0 I: input event: dev=gpio_keys SYN type= 1 code=106 value=1 I: input event: dev=gpio_keys SYN type= 1 code=106 value=0 I: input event: dev=gpio_keys SYN type= 1 code= 28 value=1 I: input event: dev=gpio_keys SYN type= 1 code= 28 value=0
Print the input events related to the four on-shield user keys using the Input subsystem API. That are:
zephyr,code = <INPUT_KEY_0>;
zephyr,code = <INPUT_KEY_1>;
zephyr,code = <INPUT_KEY_2>;
zephyr,code = <INPUT_KEY_3>;
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_lcd_2-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-input_dump
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_lcd_2-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-input_dump
on standard 4㎆
revision
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_lcd_2-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-input_dump
on extended 16㎆
revision
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_lcd_2-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-input_dump
Simple logging output on target
***** delaying boot 4000ms (per build configuration) ***** W: BUS RESET W: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** Input sample started I: input event: dev=gpio_keys SYN type= 1 code= 11 value=1 I: input event: dev=gpio_keys SYN type= 1 code= 11 value=0 I: input event: dev=gpio_keys SYN type= 1 code= 2 value=1 I: input event: dev=gpio_keys SYN type= 1 code= 2 value=0 I: input event: dev=gpio_keys SYN type= 1 code= 3 value=1 I: input event: dev=gpio_keys SYN type= 1 code= 3 value=0 I: input event: dev=gpio_keys SYN type= 1 code= 4 value=1 I: input event: dev=gpio_keys SYN type= 1 code= 4 value=0
Print the input events related to the on-shield touchscreen panel using the Input subsystem API. That are:
lvgl_pointer { input = &tsc_panel; };
tsc_panel: &xpt2046_320x480 {};
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-input_dump
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-input_dump
on standard 4㎆
revision
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-input_dump
on extended 16㎆
revision
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-input_dump zephyr/samples/subsys/input/input_dump -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-input_dump
Simple logging output on target
***** delaying boot 4000ms (per build configuration) ***** W: BUS RESET W: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** Input sample started I: input event: dev=xpt2046@1 type= 3 code= 0 value=98 I: input event: dev=xpt2046@1 type= 3 code= 1 value=174 I: input event: dev=xpt2046@1 SYN type= 1 code=330 value=1 I: input event: dev=xpt2046@1 SYN type= 1 code=330 value=0
LCD Orientation and Bit Order Test
Draw some basic rectangles onto the display. The rectangle colors and positions are chosen so that you can check the orientation of the LCD and correct RGB bit order. See also Zephyr sample: Display.
Using the Display driver API with chosen display. That is:
chosen { zephyr,display = &lcd_panel; };
lcd_panel: &st7789v_240x135 {};
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_lcd_1_14-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-display_test
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_lcd_1_14-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-display_test
on standard 4㎆
revision
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_lcd_1_14-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-display_test
on extended 16㎆
revision
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_lcd_1_14-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-display_test
Simple logging output on target
***** delaying boot 4000ms (per build configuration) ***** [00:00:00.415,000] <wrn> udc_rpi: BUS RESET [00:00:00.495,000] <wrn> udc_rpi: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** [00:00:04.151,000] <inf> sample: Display sample for st7789v@0
Using the Display driver API with chosen display. That is:
chosen { zephyr,display = &lcd_panel; };
lcd_panel: &st7789v_320x240 {};
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_lcd_2-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-display_test
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_lcd_2-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-display_test
on standard 4㎆
revision
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_lcd_2-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-display_test
on extended 16㎆
revision
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_lcd_2-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-display_test
Simple logging output on target
***** delaying boot 4000ms (per build configuration) ***** [00:00:00.337,000] <wrn> udc_rpi: BUS RESET [00:00:00.425,000] <wrn> udc_rpi: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** [00:00:04.151,000] <inf> sample: Display sample for st7789v@0
Using the Display driver API with chosen display. That is:
chosen { zephyr,display = &lcd_panel; };
lcd_panel: &ili9488_480x320 {};
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test
on standard 4㎆
revision
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test
on extended 16㎆
revision
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/drivers/display -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test
Simple logging output on target
***** delaying boot 4000ms (per build configuration) ***** [00:00:00.337,000] <wrn> udc_rpi: BUS RESET [00:00:00.425,000] <wrn> udc_rpi: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** [00:00:04.151,000] <inf> sample: Display sample for ili9488@0
LVGL Basic Sample
Displays “Hello World!” in the center of the screen and a counter at the bottom which increments every second. See also Zephyr sample: LVGL basic sample.
Using the LVGL module on top of the Display driver API with chosen display. That is:
chosen { zephyr,display = &lcd_panel; };
lcd_panel: &st7789v_240x135 {};
Devicetree compatible
zephyr,lvgl-button-input
with devicetree relationlvgl_buttons: lvgl-buttons { input = <&gpio_keys>; };
B :input-codes = <INPUT_KEY_1>;
:coordinates = <120 68>;
(center of LCD)zephyr,lvgl-keypad-input
with devicetree relationlvgl_keypad: lvgl-keypad { input = <&gpio_keys>; };
UP :input-codes = <INPUT_KEY_UP>;
:lvgl-codes = <LV_KEY_UP>;
DOWN :input-codes = <INPUT_KEY_DOWN>;
:lvgl-codes = <LV_KEY_DOWN>;
LEFT :input-codes = <INPUT_KEY_LEFT>;
:lvgl-codes = <LV_KEY_LEFT>;
RIGHT :input-codes = <INPUT_KEY_RIGHT>;
:lvgl-codes = <LV_KEY_RIGHT>;
ENTER :input-codes = <INPUT_KEY_ENTER>;
:lvgl-codes = <LV_KEY_ENTER>;
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_lcd_1_14-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-lvgl_basic
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_lcd_1_14-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-lvgl_basic
on standard 4㎆
revision
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_lcd_1_14-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-lvgl_basic
on extended 16㎆
revision
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_lcd_1_14-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_lcd_1_14"
west flash -r uf2 -d build/waveshare_pico_lcd_1_14-lvgl_basic
Simple test execution on target
***** delaying boot 4000ms (per build configuration) ***** [00:00:00.321,000] <wrn> udc_rpi: BUS RESET [00:00:00.401,000] <wrn> udc_rpi: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** uart:~$ _ uart:~$ lvgl stats memory Heap at 0x20001410 contains 2047 units in 11 buckets bucket# min units total largest largest threshold chunks (units) (bytes) ----------------------------------------------------------- 0 1 2 1 4 1 2 1 2 12 6 64 1 81 644 10 1024 1 1354 10828 11492 free bytes, 4384 allocated bytes, overhead = 504 bytes (3.1%)
Using the LVGL module on top of the Display driver API with chosen display. That is:
chosen { zephyr,display = &lcd_panel; };
lcd_panel: &st7789v_320x240 {};
Devicetree compatible
zephyr,lvgl-button-input
with devicetree relationlvgl_buttons: lvgl-buttons { input = <&gpio_keys>; };
1 :input-codes = <INPUT_KEY_1>;
:coordinates = <160 120>;
(center of LCD)zephyr,lvgl-keypad-input
with devicetree relationlvgl_keypad: lvgl-keypad { input = <&gpio_keys>; };
3 :input-codes = <INPUT_KEY_3>;
:lvgl-codes = <LV_KEY_LEFT>;
2 :input-codes = <INPUT_KEY_2>;
:lvgl-codes = <LV_KEY_RIGHT>;
1 :input-codes = <INPUT_KEY_1>;
:lvgl-codes = <LV_KEY_ENTER>;
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_lcd_2-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-lvgl_basic
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_lcd_2-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-lvgl_basic
on standard 4㎆
revision
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_lcd_2-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-lvgl_basic
on extended 16㎆
revision
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_lcd_2-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_lcd_2"
west flash -r uf2 -d build/waveshare_pico_lcd_2-lvgl_basic
Simple test execution on target
***** delaying boot 4000ms (per build configuration) ***** [00:00:00.401,000] <wrn> udc_rpi: BUS RESET [00:00:00.481,000] <wrn> udc_rpi: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** uart:~$ _ uart:~$ lvgl stats memory Heap at 0x20001320 contains 2047 units in 11 buckets bucket# min units total largest largest threshold chunks (units) (bytes) ----------------------------------------------------------- 0 1 2 1 4 1 2 1 2 12 6 64 1 81 644 10 1024 1 1354 10828 11492 free bytes, 4384 allocated bytes, overhead = 504 bytes (3.1%)
Using the LVGL module on top of the Display driver API and the Input subsystem API with chosen display and touchscreen panel. That is:
chosen { zephyr,display = &lcd_panel; };
lcd_panel: &ili9488_480x320 {};
lvgl_pointer { input = &tsc_panel; };
tsc_panel: &xpt2046_320x480 {};
Devicetree compatible
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-lvgl_basic
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-lvgl_basic
on standard 4㎆
revision
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-lvgl_basic
on extended 16㎆
revision
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-lvgl_basic zephyr/samples/subsys/display/lvgl -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-lvgl_basic
Simple test execution on target
[00:00:00.135,000] <inf> xpt2046: Init 'xpt2046@1' device ***** delaying boot 4000ms (per build configuration) ***** [00:00:00.294,000] <wrn> udc_rpi: BUS RESET [00:00:00.374,000] <wrn> udc_rpi: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** uart:~$ _ uart:~$ lvgl stats memory Heap at 0x20001238 contains 2047 units in 11 buckets bucket# min units total largest largest threshold chunks (units) (bytes) ----------------------------------------------------------- 1 2 1 2 12 10 1024 1 1500 11996 12008 free bytes, 3924 allocated bytes, overhead = 448 bytes (2.7%)
TF/microSD Demonstration
This samples and test applications are only applicable on the Waveshare Pico ResTouch LCD 3.5 board. They will be built with activated USB-CDC/ACM console.
Hint
The Waveshare Pico LCD 1.14 doesn’t provide a TF/microSD card slot. This samples are not applicable.
Hint
The Waveshare Pico LCD 2 doesn’t provide a TF/microSD card slot. This samples are not applicable.
The following samples work with the chosen SDHC interface in 1-bit mode and connected to SPI. That is:
&rpipico_spi_sdc { &sdhc_spi { compatible = "zephyr,sdhc-spi-slot"; }; };
&sdhc_spi { mmc { compatible = "zephyr,sdmmc-disk"; }; };
File system manipulation
Using the File Systems API ontop of the Disk Access API with chosen TF/microSD. See also Zephyr sample: File system manipulation.
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/subsys/fs/fs_sample -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/subsys/fs/fs_sample -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test
on standard 4㎆
revision
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/subsys/fs/fs_sample -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test
on extended 16㎆
revision
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/subsys/fs/fs_sample -- -DSHIELD="waveshare_pico_restouch_lcd_3_5"
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test

The TF/microSD card should be pre-formatted with FAT FS. If there are any files or directories present in the card, the sample lists them out on the console, e.g.:
(optional) Boot Sector: MBR (Master Boot Record)
(optional) 1st Primary Partition: W95 FAT32 (LBA) (ID: 0x0C)
FAT File System: FAT (32-bit version)
Content:
waveshare_pico_restouch_lcd_3_5/BEACH.bmp
andwaveshare_pico_restouch_lcd_3_5/CAT.bmp
Simple logging output on target
***** delaying boot 4000ms (per build configuration) ***** [00:00:00.177,000] <wrn> udc_rpi: BUS RESET [00:00:00.257,000] <wrn> udc_rpi: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** [00:00:04.281,000] <inf> main: Block count 15523840 Sector size 512 Memory Size(MB) 7580 Disk mounted. Listing dir /SD: ... [FILE] BEACH.BMP (size = 460854) [FILE] CAT.BMP (size = 460854)
In case when no files could be listed, because there are none (empty FS),
some.dir
directory and other.txt
file will be created and
list will run again to show them, e.g.:
(optional) Boot Sector: MBR (Master Boot Record)
(optional) 1st Primary Partition: W95 FAT32 (LBA) (ID: 0x0C)
FAT File System: FAT (32-bit version)
Content: NONE (empty FS)
Simple logging output on target
***** delaying boot 4000ms (per build configuration) ***** [00:00:00.234,000] <wrn> udc_rpi: BUS RESET [00:00:00.314,000] <wrn> udc_rpi: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** [00:00:04.293,000] <inf> main: Block count 15523840 Sector size 512 Memory Size(MB) 7580 Disk mounted. Listing dir /SD: ... [00:00:04.298,000] <inf> main: Creating some dir entries in /SD: Listing dir /SD: ... [FILE] SOME.DAT (size = 0) [DIR ] SOME
In there is no FS (or the FS is corrupted), the disk is attempted to re-format to FAT FS and list will run again to show them, e.g.:
Boot Sector: NONE (empty boot sector, no partition table) – (optional) MBR (Master Boot Record)
1st Primary Partition: NONE (empty partition table entry) – (optional) W95 FAT32 (LBA) (ID: 0x0C)
FAT File System: NONE (empty partition)
Content: NONE (empty FS)
***** delaying boot 4000ms (per build configuration) ***** [00:00:00.318,000] <wrn> udc_rpi: BUS RESET [00:00:00.398,000] <wrn> udc_rpi: BUS RESET *** Booting Zephyr OS … … … (delayed boot 4000ms) *** [00:00:04.270,000] <inf> main: Block count 15523840 Sector size 512 Memory Size(MB) 7580 Disk mounted. Listing dir /SD: ... [00:00:07.892,000] <inf> main: Creating some dir entries in /SD: Listing dir /SD: ... [FILE] SOME.DAT (size = 0) [DIR ] SOME
Warning
In case when mount fails the device may get re-formatted to FAT FS.
To disable this behaviour disable CONFIG_FS_FATFS_MOUNT_MKFS
.
west build -b rpi_pico -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/subsys/fs/fs_sample -- -DSHIELD="waveshare_pico_restouch_lcd_3_5" -DCONFIG_FS_FATFS_MOUNT_MKFS=n
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test
west build -b rpi_pico_w -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/subsys/fs/fs_sample -- -DSHIELD="waveshare_pico_restouch_lcd_3_5" -DCONFIG_FS_FATFS_MOUNT_MKFS=n
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test
on standard 4㎆
revision
west build -b waveshare_rp2040_plus -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/subsys/fs/fs_sample -- -DSHIELD="waveshare_pico_restouch_lcd_3_5" -DCONFIG_FS_FATFS_MOUNT_MKFS=n
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test
on extended 16㎆
revision
west build -b waveshare_rp2040_plus@16mb -p -S usb-console -d build/waveshare_pico_restouch_lcd_3_5-display_test zephyr/samples/subsys/fs/fs_sample -- -DSHIELD="waveshare_pico_restouch_lcd_3_5" -DCONFIG_FS_FATFS_MOUNT_MKFS=n
west flash -r uf2 -d build/waveshare_pico_restouch_lcd_3_5-display_test