Banana Pi BPI W3 Rockchip RK3588 development board from beginner to proficient, development document

Mondo Technology Updated on 2024-01-30

Designed and developed by the Banana Pi ecosystem member Armsom team for professional and enterprise users, the Banana Pi BPI-W3 is equipped with the Rockchip RK3588 SOC quad-core ARM Cortex-A76 and quad-core Cortex-A55, consisting of an octa-core CPU processor with a dynamic frequency extension of 24 MHz. Embedded high-performance 3D and 2D image acceleration modules, AI accelerator NPU built-in 6TOPS computing power.

Banana Pi BPI-W3 (Armsom-W3) up to 32GB 64-bit LPDDR4X memory, up to 8k@60 HDMI Out, HDMI IN, Mipi DSI, MIPI CSI, 3 with microphone5mm jack, USB port, 25gbe lan、pcie 3.0 x4、pcie 2.0x-Pin Expansion Header, RTC, POE, SD Card, DC Power Supply, TypeC.

Before you start using the ARMSOM-W3, please have the following items ready.

ARMSOM-W3 power supply (choose one of three) via DC power supply 12 volts @2 3AUSB C PD Charger (15W and above) 12 volt PoE If you want to boot from an SD card: MicroSD card TF card: Class 10 or above, at least 8GB SDHC Reference: TFCcardsWetested

Reference: PD power adapter we tested.

Use the following serial parameters:

Check out this guide to install the Rockchip Flash tool on a Windows Linux macOS PC.

Visit the Links to Image Files and Utilities.

Check out this guide to install the Rockchip TF tool under Windows Linux.

Optional) If booting with an SD card, a slot on the board needs to be inserted. Optionally, use a USB to TTL serial cable to establish a connection between the PC and the ARMSOM-W3 board. Powering ARMSOM via an adapter with a Type-C port or PoE or DC power supply, the ARMSOM-W3 will boot up and the green power LED will light up. After a while, another blue LED starts flashing, and the red LED user controls that you can open the terminal on the HDMI monitor and enter commands on the keyboard.

See Serial Console.

Using the burning tool provided by RK, I can't see the line "Found an MSC Device" at the bottom. Use a USB-TypeC cable to connect your computer to the board. On the Windows page, use the Windows+R key combination to open the command terminal, enter adb shell, and you can see root@linaro-alip:

On the ARMSOM-W3, tri-color LEDs are configured as LED-like devices. When the blue LED is not activated, the green LED will be displayed to indicate that the board is powered on. You can control the behavior pattern of the blue LEDs by writing the sys class leds blue:status trigger. By default, only root users can write to the device. The default mode for the blue LED is heartbeat.

linaro@linaro-alip: home linaro sudo su linaro password root@linaro-alip: home linaro echo timer > sys class leds blue:status triggerroot@linaro-alip: home linaro echo activity > sys class leds blue:status trigger
You can use the CAT on the trigger properties to list all available LED modes. The value in parentheses is the currently active mode.

root@linaro-alip: home linaro cat sys class leds blue: status trigger no rfkill-any rfkill - no kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock tcpm-source-psy-4 -0022-**mmc2 mmc1 timer oneshot disk activity disk readdisk write ide-disk mtd nand-disk heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 mmc0 [Active] By default, transient flash torch scare netdev rfkill0 is enabled
In None mode, write sys class leds blue:status brightness to manually control the state of the blue LEDs.

root@linaro-alip: Home Linaro Echo None > Sys Class LEDs Blue: Status triggerroot@linaro-alip: Home Linaro Echo 1 > Sys Class LEDs Blue: Status Brightness root@linaro-alip: Home Linaro Echo 0 > Sys Class LEDs Blue: Status Brightness
The red light is the same, and the class device sys class leds red:status triggerThe ARMSOM-W3 is equipped with 1 RTC IC HYM8563

First, plug in the RTC battery and power the RTC IC. Please note that we should keep the RTC battery in the RTC connector.

Second, check whether the driver is loaded successfully.

root@linaro-alip:~# dmesg |grep real-time clock [3.]149263] RTC-HYM8563 6-0051: RTC information is valid [3.]154624] RTC-HYM8563 6-0051: Registered as RTC0[3.]155646] RTC-HYM8563 6-0051: Set system clock to 2021-01-01T12:00:05 UTC (1609502405).
Finally, check if you can view and set the time.

root@linaro-alip:~# hwclock -r2022-08-07 13:38:24.370866+00:00root@linaro-alip: Date: Sun, 07 Aug 2022 13:38:41 utcroot@linaro-alip: hwclock -w
armsom-w3 configuration 1 x 25G Ethernet interface. You can connect your ARMSOM-W3 to the network using a network cable (one end is connected to an external network port or route). ARMSOM-W3 automatically configures the network for you to access the internet.

Check if the Ethernet is working properly using the ifconfig command, which shows the NIC eth0 or enp4p65s0 and the Ethernet IP address. Alternatively, you can use the ping tool to test network connectivity.

If configured
ping www.google.com
If a network cable is connected, the node is not assigned an IP address.

dhclient eth0 or dhclient enp4p65s0
The ARMSOM-W3 does not come with an onboard WiFi BT. Currently, ARMSOM-W3 has been tested and supports the following WiFi cards.

1.rtl8852be

2.ap6256

To test wifi performance, we need to follow these steps:

# 1.Switch to superuser mode root@linaro-alip: sudo su 2Turn on wifiroot@linaro-alip: nmcli r wifi on 3Scan wifiroot@linaro-alip: nmcli developed wifi 4Connect to a WiFi network root@linaro-alip: nmcli dev wifi Connect to "wifi name" password "wifi password".
Look at the sound card in your system.

root@linaro-alip: aplay -l*** list of hardware devices **Card 0: rockchipdp0 [rockchip, dp0], device 0: rockchip, dp0 spdif-hifi-0 [rockchip, dp0 spdif-hifi-0] sub-device: 1 1 sub-device 0: sub-device 0 card 1: rockchipes8316 [ Rockchip-ES8316], device 0: FE470000i2s-es8316 hifi es8316.7-0011-0 [fe470000.i2s-es8316 hifi es8316.7-0011-0] Sub-device: 1 1 Sub-device 0: Sub-device 0 Card 3: Rockchip HDMI0 [Rockchip-HDMI0], Device 0: Rockchip-HDMI0 i2S-HIFI-0 [Rockchip-HDMI0 I2S-HIFI-0] Sub-device: 1 1 Sub-device 0: Sub-device 0 Card 4: Rockchip HDMI1 [Rockchip-HDMI1] , device 0: rockchip-hdmi1 i2s-hifi-0 [rockchip-hdmi1 i2s-hifi-0] subdevice: 1 1 subdevice 0: subdevice
Specifies the sound card for the audio file.

aplay -d hw:0,0 /mnt/test.w**
root@linaro-alip:/root# arecord -d hw:1,0 -f s16_le -t w** c2 -r 16000 -d 3 t.w**Recording w**e't.w**': Signed 16-bit Little Endian, 16000 Hz, stereo root@linaro-alip: root aplay tw***w**e 't.w**': Signed 16-bit Little Endian, 16000 Hz, stereo
Three types of storage devices are supported.

Micro SD card

/dev/mmcblk1
Multi-card

/dev/mmcblk0
nvme m.2 sdd

root@linaro-alip:/home/linaro# mkdir temproot@linaro-alip:/home/linaro# mount /dev/nvme0n1 temp
The camera uses IMX415 module, and the startup log can be viewed after the camera module is connected and powered on.

root@linaro-alip:/# dmesg | grep imx415[2.547754] IMX415 3-001A: Driver version: 0001.08[2.547767] IMX415 3-001A: Get HDR mode failed!There is no HDR[2547819] IMX415 3-001A: Failed to get power gpios [2.].547826] IMX415 3-001A: Unable to get default pin state [2.]547831] IMX415 3-001A: Unable to get sleep pin status [2.]547850] IMX415 3-001A: ***D not found, using virtual regulator [2.]547918] IMX415 3-001A: Power supply not found dovdd, using virtual regulator [2.].547945] IMX415 3-001A: ***dd not found, using virtual regulator [2.]613843] IMX415 3-001A: IMX415 ID 0000E0 detected [2613890] Rockchip-CSI2-dPHY0: DFY0 Match M00 B IMX415 3-001A: Bus Type 5[18.]386174] IMX415 3-001A: Set FMT: Cur mode: 3864x2192, HDR: 0[18.]389067] IMX415 3-001A: Set **(SHR0)2047 = CUR VTS(2250)-VAL(203).
The kernel assigns a device information profile to the camera.

grep "" /sys/class/video4linux/v*/name | grep "" /sys/class/video4linux/v*/name |grep main path sys class video4linux video11 name:rkisp mainpath
Verify the functionality of the camera.

Grab one**.

v4l2-ctl -d dev video11 --set-fmt-video=width=3840, height=2160, pixel format=nv12 --stream-mmap=3 --stream-skip=60 --stream-to= tmp cif73out --stream-count=3 --stream-poll
Use gst-launch-10 is displayed on the desktop.

# gst-launch-1.0 v4l2src device = dev video11!* x-raw, format=nv12, width=3840, height=2160, framerate=30 1!XV image receiver

Connect USB3After 0 cameras, open the Qt v4L2 Test Utility application to test.

Then open the node: video21

Then tap the camera button and you will see the camera screen.

The ARMSOM-W3 uses the built-in HDMI IN port of the RK3588 chip, and the HDMI IN port can be tested using the V4L2 command.

ls /dev/***
Run the v4l2-ctl -d command to specify the vidoe node. Run the -d command to view the node information. Check the RK HDMIRX device with the driver name.

v4l2-ctl -d dev video0 -d driver info: driver name: rk hdmirx card type: rk hdmirx bus info: fdee0000hdmirx-controller driver version: 510.66 Capability: 0x84201000 Multiplanar Capture Stream Extended Pixel Format Device Capability Device Cap: 0x04201000 Multiplane Capture Stream Extended Pixel Format
Query the current resolution and image format:

v4l2-ctl -d dev video17 --get-fmt-video multiplanar ** Capture Format: Width Height: 3840 2160 px Format: "NV16" Field: No Number of Planes : 1 Flag: Premultiplied -alpha, 000000FE Color Space: Unknown (1025fcdc) Transfer Function: Unknown (00000020) YCBCR Encoding: Unknown (000000ff) Quantization: Default Plane 0 : Bytes per line: 3840**Size: 16588800
Save the image file to the device, ADB pull to the PC, view it through tools like 7YUV:

v4l2-ctl --verbose -d dev video17 -set-fmt-video=width=3840, height=2160, pixel format='nv16' \-stream-mmap=4 --stream-skip=3 \-stream-to=/data/4k60_nv16.yuv \-stream-count=5 --stream-poll
Query the status of the current HDMI RX, including signal locking, image format, timings information, and PIXL CLK.

cat d hdmirx state state: plugin clk-ch: locked ch0: locked ch1: locked ch2: locked ch0-err: 0 ch1-err:0 ch2-err:0 color format: yuv422 storage format: yuv422 (8-bit) mode: 3840x2160p60 (4400x2250) hfp: 172 hs: 92 hbp: 296 vfp: 8 vs: 10 vbp: 72 px clock: 594024000
echo 0 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip*/exportecho 10000 > /sys/devices/platform/fd8b0010.pwm pwm pwmchip* pwm0 period echo 5000 > sys devices platform fd8b0010pwm pwm pwmchip* pwm0 duty cycle echo reversal sys devices platform fd8b0010pwm pwm pwmchip* pwm0 polar echo 1 > sys devices platform fd8b0010pwm/pwm/pwmchip*/pwm0/enable#echo 0 > /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip*/pwm0/enable
Post your questions on the forumarmsom.org

1.Use ubuntu1804/ubuntu20.04 Operating System (OS).

2.One W3-Pro board.

First make sure you have Docker installed on your Ubuntu system, if not, refer to the online installation tutorial.

We provide the source code and the docker image of the installation environment: docker image

Create an RKNPU folder on your PC server and copy the firmware to that folder.

rknpu/rknn-toolkit2-1.4.0/docker$ lsmd5sum.txt rknn-toolkit2-1.4.0-cp36-docker.tar.gz rknn-toolkit2-1.4.0-cp38-docker.tar.gz
Run the following command to run the docker image. After the docker image is run, the bash environment of the image is displayed.

docker run -t -i --privileged -v /dev/bus/usb:/dev/bus/usb rknn-toolkit2:1.4.0-cp38 /bin/bash
Map the sample to the docker environment by appending the "-v:" parameter, for example:

docker run -t -i --privileged -v /dev/bus/usb:/dev/bus/usb -v /your/rknn-toolkit2-1.xx/examples:/examples rknn-toolkit2:1.xx /bin /bash
Synchronization after mapping.

The rknn service needs to run on the development board.

Board Arch corresponds to the ARCH 64 directory on 64-bit Linux and the ARMAHF directory on 32-bit Linux systems.

1.ADB pushes all files from Linux rknn server $usr bin to usr bin2 adb push linux/librknn api/$/librknrnt。So go to usr 1ib3, access the board serial terminal, and execute the following command chmod +x usr bin rknn server chmod +x usr bin start rknnsh chmod +x /usr/bin/restart rknn.sh restart rknn. Shhhh
Run the adb devices command in the docker image and remember the adb id number.

Go to examples onnx yolov5 and change testpy

ret = rknn.init_runtime(target='rk3588', device id=device id, perf debug=true, eval mem=true) output = rknninference(input=[img]) ret=rknneval perf(input=[img], is print=true)cv2.imwrite("Outcome. jpg", img_1)

Related Pages