5. Buildroot Application

5.1 Serial Terminal

Display_IO

Connect the board and PC with USB Serial cable, then power on, the terminal will output boot information. The default baudrate is 1500000.

Terminal_UI

Serial Terminal

5.2 Display

Display_IO

EM3576 supports MIPI LCD, HDMI and Type-C(DP Alt Mode) display synchronization.

The RGB signal is multiplexed with several interfaces. If RGB is required, please modify the hardware and kernel.

buildroot display

Display synchronization

5.3 USB Type-C

_images/docking-station.webp

Features supported by the Type-C interface:

  • Reversible Design: Allows insertion in either orientation for user convenience.

  • Data Transmission Roles: Supports flexible designation of host and device roles.

  • Multiple Protocol Support: Compatible with USB 3.0 and DisplayPort, enabling high-speed data transmission.

5.3.1 ADB

❶ Connect the board and PC host with Type-C cable.

_images/ADB.webp

❷ Install ADB driver on Windows system.

❸ Press Windows + R to open the Run program. Type cmd and press Enter

❹ Execute the follow commands to enable ADB.

1adb shell
_images/buildroot_adb.png

5.3.2 Type-C to USB

EM3576 supports Type-C to USB. After inserting the USB flash drive, the system will automatically mount the device.

Check information about mounted device:

1df -h
Serial terminal output
root@rk3576-buildroot:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        14G  689M   13G   6% /
devtmpfs        966M  8.0K  966M   1% /dev
tmpfs           978M  140K  978M   1% /tmp
tmpfs           978M  488K  977M   1% /run
tmpfs           978M  196K  978M   1% /var/log
tmpfs           978M     0  978M   0% /dev/shm
/dev/mmcblk2p7  123M   12M  110M  10% /oem
/dev/mmcblk2p8   15G  332K   15G   1% /userdata
/dev/sda1        31G   28G  2.2G  93% /mnt/udisk

5.3.3 DP Alt Mode

DisplayPort Alternate Mode (DP Alt Mode) is a technology that facilitates the transmission of DisplayPort video signals through a USB Type-C interface. It enables devices to output video and audio via a USB-C connection without requiring a dedicated DisplayPort connector. This allows users to connect a display using a single USB-C port while transmitting video, audio, and additional data.

Boardcon has conducted the testing at Type-C to HDMI/DP (3840 x 2160 @ 60fps).

_images/buildroot_Type-C-to-HDMI.webp

Type-C to HDMI

5.4 USB Host

USB Host IO

After inserting the USB flash drive, the system will automatically mount the device.

Check information about mounted device:

1df -h
Serial terminal output
root@rk3576-buildroot:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        14G  689M   13G   6% /
devtmpfs        966M  8.0K  966M   1% /dev
tmpfs           978M  140K  978M   1% /tmp
tmpfs           978M  504K  977M   1% /run
tmpfs           978M  204K  978M   1% /var/log
tmpfs           978M     0  978M   0% /dev/shm
/dev/mmcblk2p7  123M   12M  110M  10% /oem
/dev/mmcblk2p8   15G  332K   15G   1% /userdata
/dev/sda1        58G   47G   12G  81% /mnt/udisk
/dev/sdb1        31G   28G  2.2G  93% /media/udisk1

5.5 Ethernet

Ethernet Port

❶ Connect the Board and router with an Ethernet cable.

❷ View the status of the Network interface.

1ifconfig
Serial terminal output
root@rk3576-buildroot:/# ifconfig
eth0      Link encap:Ethernet  HWaddr B2:EF:E7:4F:BF:85
          inet addr:192.168.0.216  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::a645:3196:e4ea:385/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:59 errors:0 dropped:4 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:13635 (13.3 KiB)  TX bytes:1340 (1.3 KiB)
          Interrupt:64

❸ Ping URL to test Network.

1ping -I eth0 www.armdesigner.com
Serial terminal output
root@rk3576-buildroot:/# ping -I eth0 www.armdesigner.com
PING www.armdesigner.com (67.222.54.196) from 192.168.0.216 eth0: 56(84) bytes of data.
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=1 ttl=48 time=191 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=2 ttl=48 time=191 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=3 ttl=48 time=191 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=4 ttl=48 time=191 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=5 ttl=48 time=190 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=6 ttl=48 time=191 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=7 ttl=48 time=191 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=8 ttl=48 time=190 ms
^C
--- www.armdesigner.com ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7010ms
rtt min/avg/max/mdev = 190.493/190.668/191.365/0.274 ms

5.6 SATA

SATA+Power

Important

SATA cannot be used with USB2.0 Host simultaneously. Boardcon Android firmware default SATA is unavailable. To enable SATA, please reflash the image boot_sata.img

_images/enable_SATA.png

❶ Connect SATA and SATA power(5V).

❷ Power on.

❸ Format SATA to ext4. If the device is in ext4 format, skip this step.

1mke2fs -t ext4 /dev/sda

Warning

This operation will permanently erase all existing data on the selected partition. Before running the command below, double‑check that the device path is correct.

❹ The system will automatically mount the device. Check information about mounted device:

1df -h
Serial terminal output
root@rk3576-buildroot:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        14G  689M   13G   6% /
devtmpfs        966M  8.0K  966M   1% /dev
tmpfs           978M  140K  978M   1% /tmp
tmpfs           978M  468K  977M   1% /run
tmpfs           978M  184K  978M   1% /var/log
tmpfs           978M     0  978M   0% /dev/shm
/dev/mmcblk2p7  123M   12M  108M  10% /oem
/dev/mmcblk2p8   15G  364K   15G   1% /userdata
/dev/nvme0n1    229G  7.8G  209G   4% /mnt/storage
/dev/sda        110G  7.8G   97G   8% /media/storage1
/dev/mmcblk1p1   30G  608K   30G   1% /mnt/sdcard

5.7 SD Card

MicroSD

EM3576 supports SD Hot-plug.

After inserting the Micro SD card, the system will automatically mount the device.

Check information about mounted device:

1df -h
Serial terminal output
root@rk3576-buildroot:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        14G  689M   13G   6% /
devtmpfs        966M  8.0K  966M   1% /dev
tmpfs           978M  140K  978M   1% /tmp
tmpfs           978M  512K  977M   1% /run
tmpfs           978M  208K  978M   1% /var/log
tmpfs           978M     0  978M   0% /dev/shm
/dev/mmcblk2p7  123M   12M  110M  10% /oem
/dev/mmcblk2p8   15G  332K   15G   1% /userdata
/dev/sda1        58G   47G   12G  81% /mnt/udisk
/dev/sdb1        31G   28G  2.2G  93% /media/udisk1
/dev/mmcblk1p1   30G  608K   30G   1% /mnt/sdcard

5.8 M.2 SSD

SSD

EM3576 only supports SSD in ext4 format.

❶ Connect SSD to the M.2 socket.

❷ Power on.

❸ Format SSD to ext4. If the device is in ext4 format, skip this step.

1mke2fs -t ext4 /dev/nvme0n1

❹ The system will automatically mount the device. Check information about mounted device:

1df -h
Serial terminal output
root@rk3576-buildroot:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        14G  689M   13G   6% /
devtmpfs        966M  8.0K  966M   1% /dev
tmpfs           978M  140K  978M   1% /tmp
tmpfs           978M  520K  977M   1% /run
tmpfs           978M  192K  978M   1% /var/log
tmpfs           978M     0  978M   0% /dev/shm
/dev/mmcblk2p7  123M   12M  108M  10% /oem
/dev/mmcblk2p8   15G  348K   15G   1% /userdata
/dev/nvme0n1    229G  7.8G  209G   4% /mnt/storage
/dev/mmcblk0p1   30G  608K   30G   1% /mnt/sdcard
/dev/sda1        58G   47G   12G  81% /mnt/udisk
/dev/sdb1        31G   28G  2.2G  93% /media/udisk1

5.9 WiFi & Bluetooth

WiFi&BT

5.9.1 WiFi

❶ Connect the WiFi antenna.

❷ View the device information.

1ifconfig
Serial terminal output
root@rk3576-buildroot:/# ifconfig
p2p0      Link encap:Ethernet  HWaddr 3A:7A:CC:2A:11:87
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 38:7A:CC:2A:11:87
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

❸ Scan for available WiFi hotspots.

1iwlist wlan0 scan
Serial terminal output
root@rk3576-buildroot:/# iwlist wlan0 scan
wlan0     Scan completed :
       Cell 01 - Address: E2:5D:54:8E:58:86
                 ESSID:"EZVIZ_BE4401587"
                 Protocol:IEEE 802.11bgn
                 Mode:Master
                 Frequency:2.437 GHz (Channel 6)
                 Encryption key:on
                 Bit Rates:300 Mb/s
                 Extra:wpa_ie=dd160050f20101000050f20401000050f20401000050f202
                 IE: WPA Version 1
                     Group Cipher : CCMP
                     Pairwise Ciphers (1) : CCMP
                     Authentication Suites (1) : PSK
                 Extra:
                 IE: IEEE 802.11i/WPA2 Version 1
                     Group Cipher : CCMP
                     Pairwise Ciphers (1) : CCMP
                     Authentication Suites (1) : PSK
                 Quality=100/100  Signal level=12/100
                 Extra:fm=0002
       Cell 02 - Address: BC:1A:E4:EF:A0:D4
                 ESSID:"SZGX"
                 Protocol:IEEE 802.11bgn
                 Mode:Master
                 Frequency:2.412 GHz (Channel 1)
                 Encryption key:on
                 Bit Rates:780 Mb/s
                 Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00
                 IE: IEEE 802.11i/WPA2 Version 1
                     Group Cipher : CCMP
                     Pairwise Ciphers (1) : CCMP
                     Authentication Suites (1) : PSK                    Extra:fm=0003
       Cell 02 - Address: D8:32:14:25:B7:A2
                 ESSID:"LYB-5G"
                 Protocol:IEEE 802.11AC
                 Mode:Master
                 Frequency:5.805 GHz
                 Encryption key:on
                 Bit Rates:867 Mb/s

❹ Connect to the hotspot.

1wifi-connect.sh SSID PSK     //input your SSID and password

❺ Test the WiFi network.

1ifconfig
2ping -I wlan0 www.armdesigner.com
Serial terminal output
root@rk3576-buildroot:/# ifconfig
p2p0      Link encap:Ethernet  HWaddr 3A:7A:CC:2A:11:87
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 38:7A:CC:2A:11:87
          inet addr:192.168.0.217  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::5468:66de:9c2a:5b0e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:60 errors:0 dropped:2 overruns:0 frame:0
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8817 (8.6 KiB)  TX bytes:3872 (3.7 KiB)
root@rk3576-buildroot:/# ping -I wlan0 www.armdesigner.com
PING www.armdesigner.com (67.222.54.196) from 192.168.0.217 wlan0: 56(84) bytes of data.
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=1 ttl=48 time=193 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=2 ttl=48 time=196 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=3 ttl=48 time=195 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=4 ttl=48 time=194 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=5 ttl=48 time=251 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=6 ttl=48 time=200 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=7 ttl=48 time=195 ms
64 bytes from 67-222-54-196.unifiedlayer.com (67.222.54.196): icmp_seq=8 ttl=48 time=201 ms
^C
--- www.armdesigner.com ping statistics ---
9 packets transmitted, 8 received, 11.1111% packet loss, time 8011ms
rtt min/avg/max/mdev = 193.266/203.254/250.975/18.241 ms

5.9.2 Bluetooth

❶ View the Bluetooth device status.

1hciconfig -a
Serial terminal output
root@rk3576-buildroot:/# hciconfig -a
hci0:   Type: Primary  Bus: UART
        BD Address: 38:7A:CC:2A:11:88  ACL MTU: 1021:5  SCO MTU: 255:11
        UP RUNNING
        RX bytes:2127 acl:0 sco:0 events:60 errors:0
        TX bytes:4418 acl:0 sco:0 commands:77 errors:0
        Features: 0xff 0xff 0xff 0xfa 0xdb 0xbf 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: PERIPHERAL ACCEPT
        Name: 'BlueZ 5.77'
        Class: 0x6c0414
        Service Classes: Rendering, Capturing, Audio, Telephony
        Device Class: Audio/Video, Loudspeaker
[  185.882030] rtk_btcoex: BTCOEX hci_rev 0x05a8
[  185.882081] rtk_btcoex: BTCOEX lmp_subver 0xcbcd
        HCI Version: 5.1 (0xa)  Revision: 0x5a8
        LMP Version: 5.1 (0xa)  Subversion: 0xcbcd
        Manufacturer: Realtek Semiconductor Corporation (93)

❷ Make Bluetooth discoverable and allow it to be pairable.

1hciconfig hci0 piscan
2bluetoothctl
Serial terminal output
root@rk3576-buildroot:/# hciconfig hci0 piscan
root@rk3576-buildroot:/# bluetoothctl
hci0 new_settings: powered connectable discoverable bondable ssp br/edr le secure-conn
Agent registered
[CHG] Controller 38:7A:CC:2A:11:88 Pairable: yes
[bluetooth]#

❸ Scanning for nearby Bluetooth devices.

1scan on        //enable scanning
2scan off       //disable scanning
3devices        //list devices
  • Run scan on to start searching for devices.

  • After scanning, run scan off to stop the search and prevent continuous refreshing.

  • Run devices to view the list of detected devices.

Serial terminal output
[bluetooth]# scan on
SetDiscoveryFilter success
hci0 type 7 discovering on
Discovery started
[CHG] Controller 38:7A:CC:2A:11:88 Discovering: yes
[NEW] Device 88:68:4B:74:39:44 OPPO K10 5G
[NEW] Device 4B:73:65:34:5F:5D 4B-73-65-34-5F-5D
[NEW] Device D4:6C:27:DF:40:46 D4-6C-27-DF-40-46
[NEW] Device 10:0E:A1:1C:13:A8 10-0E-A1-1C-13-A8
[CHG] Device A8:35:12:9A:EB:4D RSSI: 0xffffffe1 (-31)
[NEW] Device 7D:B8:B6:62:89:47 7D-B8-B6-62-89-47
[NEW] Device 2C:A0:42:D1:14:D5 Kang
[NEW] Device 5D:9A:E9:D5:D8:9B 5D-9A-E9-D5-D8-9B
[NEW] Device 14:DE:39:72:B3:C3 Mate 40 Pro
[NEW] Device 43:C7:3D:C0:16:E4 43-C7-3D-C0-16-E4
[CHG] Device 14:DE:39:72:B3:C3 RSSI: 0xffffffb3 (-77)
[NEW] Device 7B:7E:22:4C:1B:08 7B-7E-22-4C-1B-08
[bluetooth]# scan off
hci0 type 7 discovering off
Discovery stopped
[CHG] Device 7B:7E:22:4C:1B:08 TxPower is nil
[CHG] Device 7B:7E:22:4C:1B:08 RSSI is nil
[CHG] Device 43:C7:3D:C0:16:E4 RSSI is nil
[CHG] Device 14:DE:39:72:B3:C3 RSSI is nil
[CHG] Device 5D:9A:E9:D5:D8:9B TxPower is nil
[CHG] Device 5D:9A:E9:D5:D8:9B RSSI is nil
[CHG] Device 2C:A0:42:D1:14:D5 RSSI is nil
[CHG] Device 7D:B8:B6:62:89:47 TxPower is nil
[CHG] Device 7D:B8:B6:62:89:47 RSSI is nil
[CHG] Device A8:35:12:9A:EB:4D RSSI is nil
[CHG] Device 10:0E:A1:1C:13:A8 RSSI is nil
[CHG] Device D4:6C:27:DF:40:46 RSSI is nil
[CHG] Device 4B:73:65:34:5F:5D TxPower is nil
[CHG] Device 4B:73:65:34:5F:5D RSSI is nil
[CHG] Device 88:68:4B:74:39:44 RSSI is nil
[CHG] Controller 38:7A:CC:2A:11:88 Discovering: no
[bluetooth]# devices
Device A8:35:12:9A:EB:4D liuy
Device 88:68:4B:74:39:44 OPPO K10 5G
Device 4B:73:65:34:5F:5D 4B-73-65-34-5F-5D
Device D4:6C:27:DF:40:46 D4-6C-27-DF-40-46
Device 10:0E:A1:1C:13:A8 10-0E-A1-1C-13-A8
Device 7D:B8:B6:62:89:47 7D-B8-B6-62-89-47
Device 2C:A0:42:D1:14:D5 Kang
Device 5D:9A:E9:D5:D8:9B 5D-9A-E9-D5-D8-9B
Device 14:DE:39:72:B3:C3 Mate 40 Pro
Device 43:C7:3D:C0:16:E4 43-C7-3D-C0-16-E4
Device 7B:7E:22:4C:1B:08 7B-7E-22-4C-1B-08
[bluetooth]#

❹ Pair the device A8:35:12:9A:EB:4D for example.

1pair A8:35:12:9A:EB:4D
Serial terminal output
[bluetooth]# pair A8:35:12:9A:EB:4D
Attempting to pair with A8:35:12:9A:EB:4D
hci0 device_flags_changed: A8:35:12:9A:EB:4D (BR/EDR)
     supp: 0x00000000  curr: 0x00000000
[bluetooth]# [  173.017134] rtk_btcoex: hci create connection, start paging
[  174.380179] rtk_btcoex: connected, handle 0001, status 0x00
[  174.380268] rtk_btcoex: Page success
hci0 A8:35:12:9A:EB:4D type BR/EDR connected eir_len 11
[CHG] Device A8:35:12:9A:EB:4D Connected: yes
[liuy]# [  174.460956] rtk_btcoex: io capability request
Request confirmation
[agent] Confirm passkey 622774 (yes/no): yes
[liuy]# [  178.036444] rtk_btcoex: link key notify
hci0 new_link_key A8:35:12:9A:EB:4D type 0x05 pin_len 0 store_hint 1
[CHG] Device A8:35:12:9A:EB:4D Bonded: yes
[liuy]# [  178.187364] rtk_btcoex: l2cap op 2, len 16, out 0
[CHG] Device A8:35:12:9A:EB:4D UUIDs: 8ce255c0-200a-11e0-ac64-0800200c9a66
[CHG] Device A8:35:12:9A:EB:4D UUIDs: 9664aa26-d76c-43ad-9775-d310f253a408
[CHG] Device A8:35:12:9A:EB:4D ServicesResolved: yes
[CHG] Device A8:35:12:9A:EB:4D Paired: yes
Pairing successful
[DEL] Device 4C:3E:56:53:EC:2D 4C-3E-56-53-EC-2D
[liuy]# [  181.164278] rtk_btcoex: l2cap op 6, len 16, out 1
[  181.164408] rtk_btcoex: TX l2cap disconn req, hndl 0x0001, dcid 0x0059, scid 0x0040
[DEL] Device 2C:A0:42:D1:14:D5 Kang
[  181.164442] rtk_btcoex: handle_l2cap_discon_req: handle 0x0001, dcid 0x0059, scid 0x0040, dir 1
[DEL] Device 78:AE:22:6E:47:2C 78-AE-22-6E-47-2C
[DEL] Device CC:64:1A:B6:C3:AE ubuntu
[liuy]# connect [  185.247311] rtk_btcoex: disconn cmpl evt: status 00, handle 0001, reason 13
hci0 A8:35:12:9A:EB:4D type BR/EDR disconnected with reason 3
[  185.247391] rtk_btcoex: process disconn complete event.
[CHG] Device A8:35:12:9A:EB:4D ServicesResolved: no
[CHG] Device A8:35:12:9A:EB:4D Connected: no

❺ Connect the device.

1connect A8:35:12:9A:EB:4D
Serial terminal output
[bluetooth]# connect A8:35:12:9A:EB:4D
Attempting to connect to A8:35:12:9A:EB:4D
[bluetooth]# [  189.910955] rtk_btcoex: hci create connection, start paging
[  190.709669] rtk_btcoex: connected, handle 0002, status 0x00
[  190.709733] rtk_btcoex: Page success
hci0 A8:35:12:9A:EB:4D type BR/EDR connected eir_len 11
[CHG] Device A8:35:12:9A:EB:4D Connected: yes
[liuy]# [  190.914878] rtk_btcoex: l2cap op 2, len 16, out 1

5.10 Audio I/O

Audio_IO

5.10.1 Audio in

5.10.1.1 Line in

❶ Plug the Microphone into the 3.5mm Audio jack(Line in).

❷ Switch to the Line in channel.

1amixer -c0 cset name='Right PGA Mux' 1
2amixer -c0 cset name='Left PGA Mux' 1
Serial terminal output
root@rk3576-buildroot:/# amixer -c0 cset name='Right PGA Mux' 1
numid=69,iface=MIXER,name='Right PGA Mux'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Line 1R'
  ; Item #1 'Line 2R'
  ; Item #2 'DifferentialR'
  : values=1
root@rk3576-buildroot:/# amixer -c0 cset name='Left PGA Mux' 1
numid=68,iface=MIXER,name='Left PGA Mux'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Line 1L'
  ; Item #1 'Line 2L'
  ; Item #2 'DifferentialL'
  : values=1

❸ Start recording.

1arecord -D hw:0,0 -f cd -r 44100 -c 2 -t wav test.wav

Press Ctrl + C to exit recording.

5.10.1.2 MIC

❶ Connect a MIC to the connector (2pin/2.0mm pitch).

❷ Switch to the microphone(MIC) channel.

1amixer -c0 cset name='Right PGA Mux' 2
2amixer -c0 cset name='Left PGA Mux' 2
Serial terminal output
root@rk3576-buildroot:/# amixer -c0 cset name='Right PGA Mux' 2
numid=69,iface=MIXER,name='Right PGA Mux'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Line 1R'
  ; Item #1 'Line 2R'
  ; Item #2 'DifferentialR'
  : values=2
root@rk3576-buildroot:/# amixer -c0 cset name='Left PGA Mux' 2
numid=68,iface=MIXER,name='Left PGA Mux'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Line 1L'
  ; Item #1 'Line 2L'
  ; Item #2 'DifferentialL'
  : values=2

❸ Start recording.

1arecord -D hw:0,0 -f cd -r 44100 -c 2 -t wav test.wav

Press Ctrl + C to exit recording.

5.10.2 Audio out

❶ View sound card.

1cat /proc/asound/cards
Serial terminal output
root@rk3576-buildroot:/# cat /proc/asound/cards
 0 [rockchipes8388 ]: rockchip-es8388 - rockchip-es8388
                      rockchip-es8388
 1 [rockchipdp0    ]: rockchip-dp0 - rockchip-dp0
                      rockchip-dp0
 2 [rockchiphdmi   ]: rockchip-hdmi - rockchip-hdmi
                      rockchip-hdmi
  • 0 - Line out

  • 1 - Type-C(DP AIT mode)

  • 2 - HDMI

❷ Select Audio output device to play test.wav

1amixer -c0 cset name='Speaker Switch' 1
2amixer -c0 cset name='Output 2 Playback Volume' 10  //(0-33)
3amixer -c0 cset name='PCM Volume' 140               //(0-192)
4aplay -Dhw:0,0 test.wav

5.11 RTC

RTC

❶ Insert a CR1220 battery before test. It keeps the time running when the main power is off.

❷ Set date and time manually.

1date -s "2024-12-20 11:23:00"     //set system date
2hwclock -w                        //set the hardware clock to current system time
3hwclock                           //display date and time
Serial terminal output
root@rk3576-buildroot:/# date -s "2024-12-20 11:23:00"
Fri Dec 20 11:23:00 UTC 2024
root@rk3576-buildroot:/# hwclock -w
root@rk3576-buildroot:/# hwclock
Fri Dec 20 11:23:06 2024  0.000000 seconds
root@rk3576-buildroot:/# hwclock
Fri Dec 20 11:23:17 2024  0.000000 seconds
root@rk3576-buildroot:/# hwclock
Fri Dec 20 11:23:55 2024  0.000000 seconds
root@rk3576-buildroot:/# hwclock
Fri Dec 20 11:24:01 2024  0.000000 seconds

❸ Power off. Wait a while, then reapply power. If the RTC is functioning correctly, the clock should maintain its time and keep running while the board is powered off.

Serial terminal output
root@rk3576-buildroot:/# hwclock
Fri Dec 20 14:09:13 2024  0.000000 seconds
root@rk3576-buildroot:/# hwclock
Fri Dec 20 14:10:32 2024  0.000000 seconds
root@rk3576-buildroot:/# hwclock
Fri Dec 20 14:10:53 2024  0.000000 seconds
root@rk3576-buildroot:/# hwclock
Fri Dec 20 14:11:06 2024  0.000000 seconds

5.12 RS485

RS485 connect

❶ Connect PC and board with USB-to-RS485 adapter.

RS485 connection

RS485 connection

❷ Open the Serial Terminal and set baud rate for EM3576 and RS485 adapter respectively.

Baud rate: EM3576 - 1500000; RS485 adapter - 115200

_images/buildroot_RS485_baudrate.png

❸ Execute command in the terminal of the board.

1com /dev/ttyS5 115200 8 0 1

❹ Input character to test RS485 communication.

_images/buildroot_RS485_Test.png

5.13 CAN

CAN

❶ Connect PC and board with USB-to-CAN adapter.

CAN connection

CAN connection

❷ Open the CAN application and set the baudrate to 500000 on PC.

_images/buildroot_CAN_baudrate.png

❸ Execute commands on Serial Terminal to configure CAN.

1ip link set can0 down
2ip link set can0 type can bitrate 500000 dbitrate 2000000 fd on
3ip link set can0 up
_images/buildroot_CAN_config.png

❹ Configure CAN as receiver.

1candump can0
_images/buildroot_CAN_receiver.png

❺ Configure CAN as Transmitter.

1cansend can0 123#DEADBEEFDEADBEEF
_images/buildroot_CAN_Transmitter.png

5.14 UART

UART connect

The UART loopback test is for reference only.

❶ Connect RX and TX of UART.

❷ Execute command and input character to test.

1com /dev/ttyS10 115200 8 0 1    //test UART10
Serial terminal output
root@rk3576-buildroot:/# com /dev/ttyS10 115200 8 0 1
port = /dev/ttyS10
baudrate = 115200
cs = 8
parity = 0
stopb = 1
hhhhhh
RECV: hhhhhh
uiuiui12121
RECV: uiuiui12121
uiuiui000
RECV: uiuiui000

❸ Press Ctrl + C to exit UART10 testing.

❹ Execute command to test UART11.

1com /dev/ttyS11 115200 8 0 1

5.15 SPI

_images/SPI.webp

❶ Connect SPI3_MISO and SPI3_MOSI of SPI.

❷ Execute command to SPI.

1spidev_test
Serial terminal output
root@rk3576-buildroot:/# spidev_test
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)

FF FF FF FF FF FF
40 00 00 00 00 95
FF FF FF FF FF FF
FF FF FF FF FF FF
FF FF FF FF FF FF
DE AD BE EF BA AD
F0 0D

5.16 Camera

_images/camera%2BBNC.webp

❶ Connect AHD camera to the development board.

❷ Preview.

1./rockchip-test/camera/camera_ahd_test.sh

5.17 Video Playback

5.17.1 Built-in playback

The script instruction directory is in /rockchip-test/video/, just run it.

Serial terminal output
root@rk3576-buildroot:/# ls /rockchip-test/video/
test_gst_multivideo.sh  test_gst_video_fps.sh     video_stresstest.sh
test_gst_video.sh       test_gst_video_maxfps.sh  video_test.sh
root@rk3576-buildroot:/# ./rockchip-test/video/test_gst_video.sh
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
mpp[1463]: mpp_info: mpp version: unknown mpp version for missing VCS info
mpp[1463]: mpp_info: mpp version: unknown mpp version for missing VCS info
mpp[1463]: mpp_info: mpp version: unknown mpp version for missing VCS info
mpp[1463]: mpp: unable to create enc vp8 for soc rk3576 unsupported
mpp[1463]: mpp_info: mpp version: unknown mpp version for missing VCS info
mpp[1463]: mpp_info: mpp version: unknown mpp version for missing VCS info
Redistribute latency...
mpp[1463]: h264d_api: is_avcC=1
Pipeline is PREROLLED ...
Prerolled, waiting for async message to finish...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstSystemClock
0:00:03.0 / 0:00:29.5 (10.4 %)

5.17.2 Browser playback

1chromium /mnt/udisk/video/4KP60/4KP60-exist.mp4

Command explanation:

  • chromium Launches the Chromium browser.

  • /mnt/udisk/video/4KP60/4KP60-exist.mp4 The media file path to be played.

5.17.3 Command line

1gst-play-1.0 --videosink="waylandsink fullscreen=true" /mnt/udisk/video/8KP30/H265_8KP30-2.mp4 --audiosink="alsasink device=hw:0,0"

Command explanation:

  • /mnt/udisk/video/8KP30/H265_8KP30-2.mp4 The media file path to be played.

  • --audiosink="alsasink device=hw:0,0" Specifies the Audio output device.

Note

The EM3576 supports 4K@60 video playback and decoding of VP8, H.264, H.265, VP9, and AV1, but H.265 compatibility depends on specific encoding profiles.