Waveshare RP2350-Matrix
The RP2350 SoC [37] by Raspberry Pi Ltd. is a small sized and low-cost 32-bit dual ARM Cortex-M33 and dual 32-bit Hazard3 RISC-V (RV32IMAC+) microcontroller and predestined for versatile board designs. The Waveshare RP2350 board series based on this microcontroller offers a wide range with different scaling factors, in size, features and interfaces for communication, input and output.
Board Overview
Hardware
The RP2350-Matrix [14] is a special sized RP2350 development board. The on-board USB-C connector makes it compatible to future standards. It comes with an on-board 8×8 RGB LED matrix for colorful lighting displays or simple images.
Features and Resources |
Printed Circuit Board |
5V/480㎃ 3.3V/800㎃ 3.3V(OUT) 150㎒ 16㎆ 520㎅ RST RGB(8×8) LED(8×8) 6-DOF USB-C UF2 11 5 4 1 1 2
Design Data
|
|
Positions
Data Sheets
Flash partitions
QSPI NOR-Flash |
code_partition |
storage_partition |
|---|---|---|
primary 16㎆ |
1㎆ |
15㎆ |
secondary N/A |
– |
– |
Pinouts
The peripherals of the RP2350 SoC [37] can be routed to various pins on the board. The configuration of these routes can be modified through DTS. Please refer to the datasheet to see the possible routings for each peripheral. The default assignments for the board is defined below.
External pin mapping on the RP2350-Matrix is not identical to the original Raspberry Pi Pico board. Almost all pins are rearranged in a more compact order. Likewise, the voltage sense and monitoring functions are not integrated. Thus all internal RP2350 GPIO lines are available for free use, insofar there is sufficient space for them on the outer edge of the board.
Only GPIO line 25 is exclusively routed to the on-board user 8×8 RGB LED array. The analog voltage reference is internally hard-wired to the digital 3.3V power supply and only decoupled by a simple resistor. There is no option to change this from outside the board.
Supported Features
Similar to the Raspberry Pi Pico 2 the board configuration supports the following hardware features:
Peripheral |
Kconfig option |
Devicetree compatible |
Zephyr API |
|---|---|---|---|
PINCTRL |
|||
GPIO |
|||
UART |
|||
UDC (USB Device Controller) |
|||
I2C |
|||
SPI |
|||
PWM |
|||
ADC |
|||
Temperature (Sensor) |
|||
Timer (Counter) |
|||
Watchdog Timer (WDT) |
|||
Flash |
|||
PIO |
N/A |
||
UART (PIO) |
|||
SPI (PIO) |
|||
WS2812 (PIO) |
|
N/A |
|
DMA |
|||
HWINFO |
N/A |
||
VREG |
|||
RESET |
|||
CLOCK |
|||
NVIC |
N/A |
Nested Vector Interrupts Controller |
|
SYSTICK |
N/A |
Other hardware features are not currently supported by Zephyr. The default configuration can be found in the different Kconfig files:
boards/waveshare/rp2350_matrix/waveshare_rp2350_matrix_rp2350a_hazard3_0_defconfig
boards/waveshare/rp2350_matrix/waveshare_rp2350_matrix_rp2350a_m33_0_defconfig
Board Configurations
The board can be configured for the following different use cases.
west build -b waveshare_rp2350_matrix/rp2350a/hazard3_0
Use the serial port UART0 on edge header as Zephyr console and for the shell. Running on Hazard3/RISC-V core. EXPERIMENTAL
west build -b waveshare_rp2350_matrix/rp2350a/hazard3_0 -S usb-console
Use the native USB device port with CDC-ACM as Zephyr console and for the shell. Running on Hazard3/RISC-V core. EXPERIMENTAL
west build -b waveshare_rp2350_matrix/rp2350a/m33_0
Use the serial port UART0 on edge header as Zephyr console and for the shell. Running on Cortex-M33 core.
west build -b waveshare_rp2350_matrix/rp2350a/m33_0 -S usb-console
Use the native USB device port with CDC-ACM as Zephyr console and for the shell. Running on Cortex-M33 core.
Connections and IOs
The Waveshare wiki [13] has detailed information about board connections. Download the different schematics or datasheets as linked above per board for more details. The pinout diagrams can also be found there.
System Clock
The RP2350A [37] MCU is configured to use the 12㎒ external crystal with the on-chip PLL generating the 150㎒ system clock. The internal AHB and APB units are set up in the same way as the upstream Raspberry Pi Pico C/C++ SDK [11] libraries.
GPIO (PWM) Ports
The RP2350A [37] MCU has 1 GPIO cell which covers all I/O pads and
8 PWM function unit each with 2 channels beside a dedicated Timer unit. The
channels A and B of PWM2 are available on the Waveshare RP2350 Matrix PCB Pads,
the channels A nd B of PWM3 and channel A of PWM4 are available on the Waveshare RP2350 Matrix header.
ADC/TS Ports
The RP2350A [37] MCU has 1 ADC with 4 channels and an additional
fifth channel for the on-chip temperature sensor (TS). The ADC channels 0-3
are available on the Waveshare RP2350 Matrix header.
The external voltage reference ADC_VREF is directly connected to the 3.3V power supply.
SPI Port
The RP2350A [37] MCU has 2 SPIs. To the edge connectors, SPI0 is
usable for external devices over GP19 (MOSI), GP16 (MISO), GP18 (SCK), and
GP17 (CSn) on the Waveshare RP2350 Matrix header. SPI1 is not available
in any default setup.
I2C Port
The RP2350A [37] MCU has 2 I2Cs. To the edge connectors, I2C0 is
usable for external devices over GP12 (I2C0_SDA), and GP13 (I2C0_SCL), on the
Waveshare RP2350 Matrix header.
The I2C1 is connected internally over GP6 (I2C1_SDA) and GP7 (I2C1_SCL) to the on-board 6D/IMU sensor (accelerometer and gyroscope).
Serial Port
The RP2350A [37] MCU has 2 UARTs. One of the UARTs (UART1) is
connected to external devices over GP10 (TX) and GP11 (RX) on the Waveshare RP2350 Matrix header and is the Zephyr console. UART0 is available on the
Waveshare RP2350 Matrix PCB Pads, optional with full featured EIA 232D modem
signals.
USB Device Port
The RP2350A [37] MCU has a (native) USB device port that can be used to communicate with a host PC. See the USB sample applications for more, such as the USB CDC ACM UART sample sample which sets up a virtual serial port that echos characters back to the host PC. As an alternative to the default Zephyr console on serial port the Bridle USB Console Snippet (usb-console) can be used to enable CDC ACM and switch the console to USB
USB device idVendor=2e8a, idProduct=000a, bcdDevice= 4.05 USB device strings: Mfr=1, Product=2, SerialNumber=3 Product: RP2350-Matrix (CDC ACM) Manufacturer: Waveshare (Raspberry Pi) SerialNumber: B46993A480CF94B1
To integrate specific USB device functions that do not follow a USB standard class, the following alternate identifier numbers are available for the various Waveshare RP2040 and RP2350 boards according to the Raspberry Pi USB product ID list [10]:
RP2040
0x101F:0x1020:0x1021:0x1039:RP2040-LCD-1.28
0x103A:0x1044:Power Management HAT (B)
0x1055:0x1056:0x1057:RP2040-Touch-LCD-1.28
0x1083:RP2040-PiZero
0x1084:0x1085:0x1086:RP2040-BLE
0x1087:PICO-Cam-A
RP2350
0x10B0:RP2350-Zero
0x10B1:RP2350-Plus
0x10B2:RP2350-Tiny
0x10B3:RP2350-LCD-1.28
0x10B4:RP2350-Touch-LCD-1.28
0x10B5:RP2350-One
0x10B6:RP2350-Geek
0x10B7:RP2350-LCD-0.96
0x10C3:RP2350-ETH
Programmable I/O (PIO)
The RP2350 SoC [37] comes with three PIO periherals. These are three simple co-processors that are designed for I/O operations. The PIOs run a custom instruction set, generated from a custom assembly language. PIO programs are assembled using pioasm, a tool provided by Raspberry Pi. Further information can be found in the Raspberry Pi Pico C/C++ SDK [11] document, section with title “Using PIOASM, the PIO Assembler”.
Zephyr does not (currently) assemble PIO programs. Rather, they should be manually assembled and embedded in source code. An example of how this is done can be found at drivers/serial/uart_rpi_pico_pio.c or drivers/spi/spi_rpi_pico_pio.c.
Programming and Debugging
Flashing
The board can only be flashed with a UF2 file. There is no SWD connector.
Using UF2
By default, building an application for the board will generate a
build/zephyr/zephyr.uf2 file. If the board is powered on with
the BOOTSEL button pressed, it will appear on the host as a mass
storage device:
USB device idVendor=2e8a, idProduct=000f, bcdDevice= 1.00 USB device strings: Mfr=1, Product=2, SerialNumber=0 Product: RP2350 Boot Manufacturer: Raspberry Pi SerialNumber: E9DB4B801D503140
The UF2 file should be drag-and-dropped or copied on command line to the device, which will then flash the board.
RP2350 Boot-ROM
Each RP2350 SoC [37] ships the UF2 compatible [6] bootloader pico-bootrom-rp2350 [12], a native support in silicon. The full source for the RP2350 bootrom at pico-bootrom-rp2350 [12] includes versions A2, A3 and A4 of the bootrom, which correspond to the same silicon revisions, respectively.
Note that every time you build a program for the RP2350, the Pico SDK selects and creates an appropriate image definition and/or partition table block with attributes and precedes it in the firmware. Further information can be found in the RP2350 Datasheet [38], sections with title “Bootrom” and “Processor Controlled Boot Sequence”.
Debugging
The board does not provide any SWD connector, thus debugging software is not possible.
Basic Samples
LED Blinky and Fade
WS2812 LED Test Pattern by PIO
See also Zephyr sample: LED strip.
On Hazard3 RISC-V (RV32IMAC+)
west build -b waveshare_rp2350_matrix/rp2350a/hazard3_0 -p -d build/waveshare_rp2350_matrix zephyr/samples/drivers/led/led_strip west flash -d build/waveshare_rp2350_matrixOn ARM Cortex-M33
west build -b waveshare_rp2350_matrix/rp2350a/m33_0 -p -d build/waveshare_rp2350_matrix zephyr/samples/drivers/led/led_strip west flash -d build/waveshare_rp2350_matrix
Hint
Neither LED Blinky nor LED Fade can be built and executed on this board, because this system has only a digital RGB LED strip. A simple GPIO or PWM control is not possible!
Hello Shell with USB-CDC/ACM Console
Hello Shell
See also Bridle sample: Hello Shell.
On Hazard3 RISC-V (RV32IMAC+)
west build -b waveshare_rp2350_matrix/rp2350a/hazard3_0 -p -S "usb-console" -d build/waveshare_rp2350_matrix bridle/samples/helloshell west flash -d build/waveshare_rp2350_matrixOn ARM Cortex-M33
west build -b waveshare_rp2350_matrix/rp2350a/m33_0 -p -S "usb-console" -d build/waveshare_rp2350_matrix bridle/samples/helloshell west flash -d build/waveshare_rp2350_matrix
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: 0xb3b5b0db15962057
uart:~$ kernel version
Zephyr version 4.5.0
uart:~$ bridle version
Bridle version 4.4.99
uart:~$ bridle version long
Bridle version 4.4.99.0
uart:~$ bridle info
Zephyr: 4.5.0
Bridle: 4.4.99
On Hazard3 RISC-V (RV32IMAC+)
uart:~$ device list
devices:
- clock-controller@40010000 (READY)
DT node labels: clocks
- reset-controller@40020000 (READY)
DT node labels: reset
- interrupt-controller (READY)
DT node labels: intc
- snippet_cdc_acm_console_uart (READY)
DT node labels: snippet_cdc_acm_console_uart
- timer@400b8000 (READY)
DT node labels: timer1
- timer@400b0000 (READY)
DT node labels: timer0
- uart@40078000 (READY)
DT node labels: uart1 rp2350matrix_serial
- uart@40070000 (READY)
DT node labels: uart0
- watchdog@400d8000 (READY)
DT node labels: wdt0
- pio@50200000 (READY)
DT node labels: ((pio_hw_t *)0x50200000u)
- dma@50000000 (READY)
DT node labels: dma
- gpio-port@0 (READY)
DT node labels: gpio0 gpio0_lo
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- adc@400a0000 (READY)
DT node labels: adc
- flash-controller@400d0000 (READY)
DT node labels: qmi
- i2c@40098000 (READY)
DT node labels: i2c1
- i2c@40090000 (READY)
DT node labels: i2c0 rp2350matrix_i2c
- pwm@400a8000 (READY)
DT node labels: pwm
- vreg@40100000 (READY)
DT node labels: vreg
- pio-ws2812 (READY)
- ws2812-8x8 (READY)
DT node labels: ws2812_8x8 led_strip
- qmi8658a@6b (READY)
DT node labels: qmi8658
- dietemp (READY)
DT node labels: die_temp
On ARM Cortex-M33
uart:~$ device list
devices:
- clock-controller@40010000 (READY)
DT node labels: clocks
- reset-controller@40020000 (READY)
DT node labels: reset
- snippet_cdc_acm_console_uart (READY)
DT node labels: snippet_cdc_acm_console_uart
- timer@400b8000 (READY)
DT node labels: timer1
- timer@400b0000 (READY)
DT node labels: timer0
- uart@40078000 (READY)
DT node labels: uart1 rp2350matrix_serial
- uart@40070000 (READY)
DT node labels: uart0
- watchdog@400d8000 (READY)
DT node labels: wdt0
- pio@50200000 (READY)
DT node labels: ((pio_hw_t *)0x50200000u)
- dma@50000000 (READY)
DT node labels: dma
- gpio-port@0 (READY)
DT node labels: gpio0 gpio0_lo
- usbd@50110000 (READY)
DT node labels: usbd zephyr_udc0
- adc@400a0000 (READY)
DT node labels: adc
- flash-controller@400d0000 (READY)
DT node labels: qmi
- i2c@40098000 (READY)
DT node labels: i2c1
- i2c@40090000 (READY)
DT node labels: i2c0 rp2350matrix_i2c
- pwm@400a8000 (READY)
DT node labels: pwm
- vreg@40100000 (READY)
DT node labels: vreg
- pio-ws2812 (READY)
- ws2812-8x8 (READY)
DT node labels: ws2812_8x8 led_strip
- qmi8658a@6b (READY)
DT node labels: qmi8658
- dietemp (READY)
DT node labels: die_temp
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 on-chip voltage regulator unit:
uart:~$ regulator vlist vreg
0.550000 V
0.600000 V
0.650000 V
0.700000 V
0.750000 V
0.800000 V
0.850000 V
0.900000 V
0.950000 V
1.000000 V
1.050000 V
1.100000 V
1.150000 V
1.200000 V
1.250000 V
1.300000 V
1.350000 V
1.400000 V
1.500000 V
1.600000 V
1.650000 V
1.700000 V
1.800000 V
1.900000 V
2.000000 V
2.350000 V
2.500000 V
2.650000 V
2.800000 V
3.000000 V
3.150000 V
3.300000 V
uart:~$ regulator vget vreg
1.100000 V
Operate with the RGB digital LED strip RGB(8×8) at PIO0 / GP25:
uart:~$ led_strip get_length led_strip
ws2812-8x8 has 64 pixel(s)
Sett all LEDs to RED:
uart:~$ led_strip fill led_strip 070000 64
Sett all LEDs to YELLOW:
uart:~$ led_strip fill led_strip 070700 64
Sett all LEDs to GREEN:
uart:~$ led_strip fill led_strip 000700 64
Sett all LEDs to CYAN:
uart:~$ led_strip fill led_strip 000707 64
Sett all LEDs to BLUE:
uart:~$ led_strip fill led_strip 000007 64
Sett all LEDs to MAGENTA:
uart:~$ led_strip fill led_strip 070007 64
Sett all LEDs to WHITE (all on):
uart:~$ led_strip fill led_strip 070707 64
Sett all LEDs to BLACK (all off):
uart:~$ led_strip fill led_strip 000000 64
Get an overview of aviliable signale names:
uart:~$ gpio info gpio0
ngpios: 30
Reserved pin mask: 0xC2000000
Reserved Pin Line Name
0 TX0
1 RX0
2 GP2_CTS0
3 GP3_RTS0
4 GP4_DSR0
5 GP5_DTR0
6 IMU_SDA1
7 IMU_SCL1
8 IMU_INT1
9 IMU_INT2
10 TX1
11 RX1
12 SDA0
13 SCL0
14 GP14
15 GP15
16 SDI0
17 CSN0
18 SCK0
19 SDO0
20 GP20_PWM4_DCD0
21 GP21_PWM5_RI0
22 GP22_PWM6
23 GP23_PWM7
24 GP24_PWM8
* 25
26 ADC0
27 ADC1
28 ADC2
29 ADC3
Operate with the channels:
on-chip temperature sensor on channel ADC_CH4
uart:~$ adc adc@400a0000 resolution 12
uart:~$ adc adc@400a0000 print
adc@400a0000:
Gain: 1
Reference: INTERNAL
Acquisition Time: 0
Channel ID: 0
Differential: 0
Resolution: 12
uart:~$ adc adc@400a0000 read 4
read: 848
Operate with the tow on-chip timer units:
uart:~$ timer oneshot timer0 0 1000000
timer: Alarm triggered
uart:~$ timer oneshot timer1 0 1000000
timer: Alarm triggered
Erase, Write and Verify
uart:~$ flash read qmi 0xe0000 0x40
000E0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |........ ........|
000E0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |........ ........|
000E0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |........ ........|
000E0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |........ ........|
uart:~$ flash test qmi 0xe0000 0x1000 2
Erase OK.
Write OK.
Verified OK.
Erase OK.
Write OK.
Verified OK.
Erase-Write-Verify test done.
uart:~$ flash read qmi 0xe0000 0x40
000E0000: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f |........ ........|
000E0010: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f |........ ........|
000E0020: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f | !"#$%&' ()*+,-./|
000E0030: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f |01234567 89:;<=>?|
uart:~$ flash page_info 0xe0000
Page for address 0xe0000:
start offset: 0xe0000
size: 4096
index: 224
uart:~$ flash erase qmi 0xe0000 0x1000
Erase success.
uart:~$ flash read qmi 0xe0000 0x40
000E0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |........ ........|
000E0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |........ ........|
000E0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |........ ........|
000E0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |........ ........|
The RP2350-Matrix has the on-board acceleration sensor connected on I2C1.
uart:~$ i2c scan i2c1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- 6b -- -- -- --
70: -- -- -- -- -- -- -- --
1 devices found on i2c1
The I2C address 0x6b is a Sensortek QMI8658 [25] 6D Acceleration
and Gyroscope Sensor and their Chip- and Revision-ID can read from
register 0x0 and 0x1`. The Chip-ID must be ``0x05, the
Revision-ID 0x7c:
uart:~$ i2c read_byte i2c1 6b 0
Output: 0x05
uart:~$ i2c read_byte i2c1 6b 1
Output: 0x7c
Or read at once as a two byte sequence:
uart:~$ i2c read i2c1 6b 0 2
00000000: 05 7c |.| |
uart:~$ sensor info
device name: dietemp, vendor: Raspberry Pi Foundation, model: pico-temp, friendly name: RP2350 chip temperature
device name: qmi8658a@6b, vendor: QST Corporation, model: qmi8658a, friendly name: on-board accelerometer/gyroscope
on-chip temperature sensor
uart:~$ sensor get dietemp
channel type=12(die_temp) index=0 shift=6 num_samples=1 value=4279493706293ns (39.783264)
on-board 3-axis accelerometer and 3-axis gyroscope
Default attributes for all three axis:
range,
full_scale: 2g = 19.613300 ㎨ODR,
sampling_frequency: 224 ㎐ (in 6DOF mode)
uart:~$ sensor attr_get qmi8658a@6b accel_xyz full_scale
qmi8658a@6b(channel=accel_xyz, attr=full_scale) value=19.613300 value=0.000000 value=0.000000
uart:~$ sensor attr_get qmi8658a@6b accel_xyz sampling_frequency
qmi8658a@6b(channel=accel_xyz, attr=sampling_frequency) value=224.000000 value=0.000000 value=0.000000
uart:~$ sensor get qmi8658a@6b
channel type=0(accel_x) index=0 shift=6 num_samples=1 value=517517460727ns (0.025138)
channel type=1(accel_y) index=0 shift=6 num_samples=1 value=517517460727ns (-0.918774)
channel type=2(accel_z) index=0 shift=6 num_samples=1 value=517517460727ns (-9.545083)
channel type=3(accel_xyz) index=0 shift=6 num_samples=1 value=517517460727ns, (0.025138, -0.918774, -9.545083)
channel type=4(gyro_x) index=0 shift=6 num_samples=1 value=517517460727ns (-0.057814)
channel type=5(gyro_y) index=0 shift=6 num_samples=1 value=517517460727ns (0.049086)
channel type=6(gyro_z) index=0 shift=6 num_samples=1 value=517517460727ns (0.006271)
channel type=7(gyro_xyz) index=0 shift=6 num_samples=1 value=517517460727ns, (-0.057814, 0.049086, 0.006271)
channel type=12(die_temp) index=0 shift=6 num_samples=1 value=517517460727ns (35.957030)
uart:~$ sensor trig qmi8658a@6b on data_ready
Enabled trigger idx=1 data_ready on device qmi8658a@6b
[00:02:01.930,000] <inf> sensor_shell: sensor=qmi8658a, chan=accel_x, num_samples=1125, data=-4.502443
[00:02:01.930,000] <inf> sensor_shell: sensor=qmi8658a, chan=accel_y, num_samples=1125, data=0.061246
[00:02:01.930,000] <inf> sensor_shell: sensor=qmi8658a, chan=accel_z, num_samples=1125, data=-8.399384
[00:02:01.930,000] <inf> sensor_shell: sensor=qmi8658a, chan=gyro_x, num_samples=1125, data=0.002594
[00:02:01.930,000] <inf> sensor_shell: sensor=qmi8658a, chan=gyro_y, num_samples=1125, data=0.076201
[00:02:01.930,000] <inf> sensor_shell: sensor=qmi8658a, chan=gyro_z, num_samples=1125, data=0.005080
[00:02:01.930,000] <inf> sensor_shell: sensor=qmi8658a, chan=die_temp, num_samples=1125, data=35.205586
[00:02:06.938,000] <inf> sensor_shell: sensor=qmi8658a, chan=accel_x, num_samples=1125, data=-4.503757
[00:02:06.938,000] <inf> sensor_shell: sensor=qmi8658a, chan=accel_y, num_samples=1125, data=0.060843
[00:02:06.938,000] <inf> sensor_shell: sensor=qmi8658a, chan=accel_z, num_samples=1125, data=-8.399652
[00:02:06.938,000] <inf> sensor_shell: sensor=qmi8658a, chan=gyro_x, num_samples=1125, data=0.002901
[00:02:06.938,000] <inf> sensor_shell: sensor=qmi8658a, chan=gyro_y, num_samples=1125, data=0.076258
[00:02:06.938,000] <inf> sensor_shell: sensor=qmi8658a, chan=gyro_z, num_samples=1125, data=0.004911
[00:02:06.938,000] <inf> sensor_shell: sensor=qmi8658a, chan=die_temp, num_samples=1125, data=35.242746
[00:02:11.946,000] <inf> sensor_shell: sensor=qmi8658a, chan=accel_x, num_samples=1125, data=-4.504825
[00:02:11.946,000] <inf> sensor_shell: sensor=qmi8658a, chan=accel_y, num_samples=1125, data=0.061119
[00:02:11.946,000] <inf> sensor_shell: sensor=qmi8658a, chan=accel_z, num_samples=1125, data=-8.399220
[00:02:11.947,000] <inf> sensor_shell: sensor=qmi8658a, chan=gyro_x, num_samples=1125, data=0.002950
[00:02:11.947,000] <inf> sensor_shell: sensor=qmi8658a, chan=gyro_y, num_samples=1125, data=0.076219
[00:02:11.947,000] <inf> sensor_shell: sensor=qmi8658a, chan=gyro_z, num_samples=1125, data=0.004796
[00:02:11.947,000] <inf> sensor_shell: sensor=qmi8658a, chan=die_temp, num_samples=1125, data=35.265475
uart:~$ sensor trig qmi8658a@6b off data_ready
Disabled trigger idx=1 data_ready on device qmi8658a@6b
More Samples
3-Axis accelerometer data on USB-CDC/ACM Console
The samples are prepared for the on-board 6-DOF accelerometer and gryoscope, connected to the I2C1 bus, but works only with the accelerometer data.
Polling Mode
Get 3-axis accelerometer data from the on-board sensor (polling mode) using the Sensors API. See also Zephyr sample Generic 3-Axis accelerometer polling.
Invoke west build and west flash:
On Hazard3 RISC-V (RV32IMAC+)
west build -b waveshare_rp2350_matrix/rp2350a/hazard3_0 -p -S "usb-console" -d build/waveshare_rp2350_matrix zephyr/samples/sensor/accel_polling west flash -d build/waveshare_rp2350_matrixOn ARM Cortex-M33
west build -b waveshare_rp2350_matrix/rp2350a/m33_0 -p -S "usb-console" -d build/waveshare_rp2350_matrix zephyr/samples/sensor/accel_polling west flash -d build/waveshare_rp2350_matrix
Simple test execution on target
*** Booting Zephyr OS build v4.5.0…***
qmi8658a@6b [m/s^2]: ( -2.002151, 0.278924, -9.388861)
qmi8658a@6b [m/s^2]: ( -2.015917, 0.290296, -9.406818)
qmi8658a@6b [m/s^2]: ( -1.985391, 0.244807, -9.407416)
qmi8658a@6b [m/s^2]: ( -0.367509, -0.977432, -9.715071)
qmi8658a@6b [m/s^2]: ( 0.267552, -0.016160, -9.526528)
Trigger Mode
Get 3-axis accelerometer data from the on-board sensor (trigger mode) using the Sensors API. See also Zephyr sample Accelerometer trigger.
Invoke west build and west flash:
On Hazard3 RISC-V (RV32IMAC+)
west build -b waveshare_rp2350_matrix/rp2350a/hazard3_0 -p -S "usb-console" -d build/waveshare_rp2350_matrix zephyr/samples/sensor/accel_trig west flash -d build/waveshare_rp2350_matrixOn ARM Cortex-M33
west build -b waveshare_rp2350_matrix/rp2350a/m33_0 -p -S "usb-console" -d build/waveshare_rp2350_matrix zephyr/samples/sensor/accel_trig west flash -d build/waveshare_rp2350_matrix
Simple test execution on target
*** Booting Zephyr OS build v4.5.0… ***
qmi8658a@6b [m/s^2]: ( -2.696469, -0.062847, -9.179369)
qmi8658a@6b [m/s^2]: ( -2.694673, -0.068234, -9.179967)
qmi8658a@6b [m/s^2]: ( -2.696469, -0.059256, -9.182960)
qmi8658a@6b [m/s^2]: ( -2.692279, -0.059855, -9.184756)
qmi8658a@6b [m/s^2]: ( -2.682702, -0.053869, -9.152434)
6-DOF accelerometer and gryoscope data on USB-CDC/ACM Console
The samples are prepared for the on-board 6-DOF accelerometer and gryoscope, connected to the I2C1 bus.
6DOF Motion Dataready
Get 3-axis accelerometer data, 3-axis gryoscope data, and sensor temperature form the on-board sensor (trigger mode) using the Sensors API. See also Zephyr sample Generic 6DOF Motion Dataready.
Invoke west build and west flash:
On Hazard3 RISC-V (RV32IMAC+)
west build -b waveshare_rp2350_matrix/rp2350a/hazard3_0 -p -S "usb-console" -d build/waveshare_rp2350_matrix zephyr/samples/sensor/6dof_motion_drdy west flash -d build/waveshare_rp2350_matrixOn ARM Cortex-M33
west build -b waveshare_rp2350_matrix/rp2350a/m33_0 -p -S "usb-console" -d build/waveshare_rp2350_matrix zephyr/samples/sensor/6dof_motion_drdy west flash -d build/waveshare_rp2350_matrix
Simple test execution on target
*** Booting Zephyr OS build v4.5.0… ***
Found device "qmi8658a@6b", getting sensor data
[0:00:01.019]: temp 34.60 Cel accel -0.569819 -1.183334 -9.630077 m/s/s gyro -0.065995 0.080994 -0.055086 rad/s
[0:00:01.024]: temp 34.60 Cel accel -0.593163 -1.254561 -9.466074 m/s/s gyro -0.006272 0.075812 -0.065177 rad/s
[0:00:01.028]: temp 34.60 Cel accel -0.627280 -1.226429 -9.332598 m/s/s gyro 0.019634 0.069540 -0.066540 rad/s
[0:00:01.033]: temp 34.60 Cel accel -0.647032 -1.227626 -9.348758 m/s/s gyro 0.025634 0.068995 -0.061631 rad/s
[0:00:01.037]: temp 34.60 Cel accel -0.653617 -1.224035 -9.424774 m/s/s gyro 0.009272 0.070631 -0.056723 rad/s
Display Test and Demonstration
The following samples work with the chosen display. That is:
chosen { zephyr,display = &led_strip_matrix; };&led_strip_matrix { led-strip = <&led_strip>; };LCD Orientation and Bit Order Test
Draw some basic rectangles onto the display using the Display driver API. See also Zephyr sample: Display.
On Hazard3 RISC-V (RV32IMAC+)
west build -b waveshare_rp2350_matrix/rp2350a/hazard3_0 -p -S "usb-console" -d build/waveshare_rp2350_matrix zephyr/samples/drivers/display west flash -d build/waveshare_rp2350_matrixOn ARM Cortex-M33
west build -b waveshare_rp2350_matrix/rp2350a/m33_0 -p -S "usb-console" -d build/waveshare_rp2350_matrix zephyr/samples/drivers/display west flash -d build/waveshare_rp2350_matrix
|
|---|
TOP LEFT, TOP RIGHT, BOTTOM RIGHT |