Thanh Le / bench notes
DOC TL-2026 · BENCH NOTES · EMBEDDED / LINUX

I take boards apart
from the boot ROM up.

I'm Thanh Le, an embedded/firmware engineer at Amazon. Most evenings I'm at home getting one of my own dev boards to boot: bare metal, FreeRTOS, an NPU without Linux, old SoCs pushed further than their vendors went.

This site is where I write down what broke and what I measured, so the next time I hit the same wall I don't start from zero.

Boards on the bench12
Board stories (STAR)42
Linux notes12
Power-on to RTOS (ROCK 3A)154 ms
Oldest SoC revivedBCM2835 (2012)
Writing here since2017

Boards

§1 · one hub per board, each milestone written as Situation / Task / Action / Result
RK3568

Radxa ROCK 3A

Bare metal, FreeRTOS on four A55s, a 154 ms boot, NPU without Linux, Android 14, a hidden RISC-V MCU

12 stories · 8 GB DRAM seen from my own code; download to Maskrom again in ~3 s, 0 hands
S5P4418

NanoPi 2 Fire

An old quad Cortex-A9 board from FriendlyELEC, taken from the boot ROM up to a FreeRTOS webcam that finds faces

6 stories · 1 GiB DDR3 at 800 MHz, 0 errors over two full passes
BCM2835

Raspberry Pi Zero W

Bare metal with no SD card, a FreeRTOS shell on the boot cable, and the 12 QPUs driven from my own code

3 stories · Power-on to my code in ~10 s over USB; stable firmware fails, 1.20241126 works
BCM2835

Raspberry Pi 1 Model B

A 2012 Pi with no Linux: FreeRTOS, MJPEG decoded by the VideoCore, a face detector on the 12 QPUs, a WS2812 ring

4 stories · Unchanged image boots; next build over UART: 921 KB in 6.7 s instead of a card swap
BCM2712 + RP1

Raspberry Pi 5

A read-only survey of my Pi 5, and FreeRTOS borrowing one of its cores from a running Linux (QEMU so far)

2 stories · RP1 on PCIe x4 at 5 GT/s; idle 1.5 GHz, 47.7 C, fan off, ~1.93 W on the PMIC rails
RISC-V C906

Allwinner D1-H Nezha

A single-core RISC-V board: my own boot0 on SPI-NAND, FreeRTOS, a webcam on HDMI with no Linux, XR829 Wi-Fi on mainline

5 stories · vl=4 at e32 -> VLEN 128, vsetivli SIGILL (RVV 0.7.1); FEL via reboot efex, no button
A83T

Banana Pi M3

An octa-core Allwinner board I drove from the FEL boot ROM: my own code in SRAM, then DRAM, then a CLI for every peripheral

4 stories · 8 cores online, 11 OPPs 480 to 2016 MHz, FEL at 12 Mbit/s
MT7623N

Banana Pi R2

Five Ethernet jacks on two MACs, a quad Cortex-A7, and nothing measured on the board yet

hub only · nothing measured yet
Snapdragon 800

DragonBoard 8074

Intrinsyc's APQ8074 board, from its stock Android 4.3 to Android 15 on kernel 6.6, then HDMI, sound, USB and local AI

5 stories · Launcher3 home screen on the panel; boot from eMMC in 66 s

Intel Edison

Two Atom cores at 500 MHz on a Mini Breakout: its boot measured from the USB side, then Zephyr run from RAM

2 stories · Reset to login 59.52 s; the ROM waits 8.92 s on USB for a flasher at every boot
S5P6818

NanoPC-T3

The 64-bit big sister of my NanoPi 2 Fire. Everything so far comes from the schematic, U-Boot and the boot files, not the board

hub only · nothing measured yet
Amlogic S905

NanoPi K2

A quad A53 TV-box chip on a Pi-sized board. I've read it, fixed my demos against mainline, and not run them on hardware yet

hub only · nothing measured yet

Edge AI

§2 · AI stories from the boards and robots, models running on the chip itselfEdge AI page
ROCK3A

Webcam to NPU to HDMI, with no Linux on the chip

Driving the RK3568 NPU, my own xHCI/UVC host and a JPEG decoder from FreeRTOS, RetinaFace boxes on HDMI

result · 718 webcam frames in 30 s (25.09 fps), faces in 703, JPEG to screen 28.0 ms avg, 0 dropped
ROCK3A

Porting Android 14 to the ROCK 3A myself

Radxa ships Android 14 for the ROCK 3C only: a new product from its tree, 13 kinds of build failure, a DDR blob that hangs on reboot

result · Android 14 + kernel 6.1.99 + GApps booting; warm reboot back in 36 s; YOLOv5s 34.58 ms on the NPU at 1 GHz
ROCK3A

A Vietnamese voice assistant with the network unplugged

Speech to text, a 0.6B LLM and Vietnamese TTS on the RK3568's four A55 cores under Android 14, recorded 17 times

result · First spoken word 11.8 s after the question (median of 12), LLM 4.0 tok/s, about 4 in 10 answers right
NANOPI2 FIRE

Face detection on four 2016 Cortex-A9 cores, no NPU, no Linux

FastestDet and YuNet hand-lowered to C + NEON inside the FreeRTOS webcam firmware, then made fast enough to follow a face

result · Person detection 642 ms → 184 ms (4 cores); faces 85 → 42 ms, same outputs bit for bit
NANOPI2 FIRE

A hang at 186 s, and a 512 KB L2 cache nobody had switched on

A watchdog black box that pointed at one bad MJPEG frame, then the PL310 L2 that hung the board until I read the vendor's sources

result · Hang fixed (417 s clean past the 186 s mark); L2 on: YuNet 42 → 27 ms
PI1

A face detector on a 2012 Pi: 2.37 s to 43.5 ms on the 12 QPUs

YuNet from my NanoPi project on the ARM1176, then every convolution moved onto the VideoCore's shader cores

result · One picture 2374 -> 43.5 ms; live 0.3 -> 12.3 detections/s (17.5 after the webcam fix)
DB8074

Local AI on a 2013 phone chip, and an L2 cache stuck at 576 MHz

No NPU, no GPU compute: LLM, speech and vision on four Krait cores, then a new driver so the L2 follows the CPU

result · Qwen2.5-0.5B at 4.15 tok/s; L2 driver lifts 4-thread memory read from 4433 to 7084 MB/s
MICRODUCK

How the duck learns to walk: no reference motion, 16 rewards

I read the training code to see where the gait comes from, and found two of my own notes were wrong

result · gait from 16 reward terms only (largest air_time +3.0), 4096 robots on a GPU, ~1–2 h on a GPU per upstream
MICRODUCK

Running the official policies with no window

Their play script wants a viewer and a keyboard; three swapped names and a fake clock made it run headless on a CPU

result · in MuJoCo: 4 runs, 0 falls, 10 s simulated in 8.54 s on CPU; speed only 0.09–0.11 of 0.3 m/s
ROCK3A

The board that names the music it plays, now on Linux

The YAMNet genre demo moved from Android 14 to Debian 11: a PipeWire monitor tap, one C program and the same INT8 model on the RK3568 NPU

result · 1.44 ms per YAMNet window on the NPU at 900 MHz (Android: 2.05 ms), 32x faster than one CPU thread, piano, rock and s...
ROCK3A

The RK3568 NPU: what Radxa's docs say, and what it did on my boards

Radxa's RKNN guide for the ROCK 3A read side by side with my own runs: converting with rknn-toolkit2, calling librknnrt from C, NPU against CPU and GPU, and the traps the docs don't mention

result · NPU INT8 32x one CPU thread on YAMNet (1.44 vs 45.68 ms), 6.5x four threads on Real-ESRGAN (219.2 vs 1433.0 ms); abou...
ROCK3A

The RISC-V MCU keeps watch: webcam to NPU with all four A55s off

The RK3568's own RV32 core drives the USB webcam, RGA2 and the NPU by itself, keeps DRAM in self-refresh between frames and powers an A55 back on only when it finds a face

result · DRAM in self-refresh 74.0 % of a 1 s camera cycle with all four A55s powered off; bell to core 0 in 16 µs; colour ste...

Robotics

§3 · one hub per robot, each milestone as Situation / Task / Action / Result
13 DYNAMIXEL

Dino robot

My own biped dinosaur on the servos I already own: drawn in CadQuery, loads checked on the model, walking in MuJoCo

4 stories · worst static load: stance knee 0.759 N·m = 30.3 % of MX-28 stall (limit 40 %), robot 2715 g
14 × XL330

Microduck

Pollen Robotics' small open biped that learns to walk in simulation; I run their pipeline before building one

3 stories · in MuJoCo: 4 runs, 0 falls, 10 s simulated in 8.54 s on CPU; speed only 0.09–0.11 of 0.3 m/s
17-servo biped

Humanoid

My thesis robot, brought back as a model: my own C++ kinematics library, MuJoCo physics, an online walker with IMU feedback

4 stories · 17 SG90s walking on the floor from angles I computed myself, played back over 9600-baud serial
MX-28, AX-12A

DYNAMIXEL servos

Smart servos on one half-duplex bus, and what their Python SDK really puts on the wire

1 story · All 6 e-manual packet examples match byte for byte; a write of FF FF FD goes out unstuffed (LEN 9, not 10);...
2D, 240°

Hokuyo URG-04LX lidar

An old USB laser scanner: talking SCIP 2.0 by hand, then fixing the demos that ran on it

2 stories · 682 steps per scan with 0 bad checksum lines, 100.6 ms per frame, σ 3 to 4 mm at 14 cm (the spec allows ±30...

Embedded notes

§4 · single posts, older projects and reading notes
DONE

Bluetooth Keyboard, Mouse & Media Emulator on Raspberry Pi

My Raspberry Pi pretends to be a Bluetooth keyboard, mouse and media remote; started 2017, still patched in 2026

last change · 2026-11-22: rewritten as a STAR story
DONE

Pytest

Ghi chép học pytest của mình: test file, fixtures, marks, config, plugin

last change · 2026-11-22: viết lại theo dạng STAR
IN PROGRESS

Linux Overlay File System

Ghi chép của mình về overlayfs: lower/upper, whiteout, và factory reset bằng cách xoá upper

last change · 2026-11-22: viết lại theo dạng STAR
DONE

Pytest-Embedded

Mình thử plugin pytest-embedded của Espressif: cài đặt, các service, chạy test hello world trên ESP32-C3

last change · 2026-11-22: viết lại theo dạng STAR
DONE

Boot sequence on Wireless MCU ESP8266

What runs between power-on and my app on the ESP8266: ROM (BL0), the first-stage bootloader, the partition table

last change · 2026-11-22: rewritten as a STAR story; ROM addresses re-checked against the SDK
DONE

ESP8266 Flash Map & Partition Table

Where the ESP8266 keeps what on its external SPI flash: bootloader, partition table, NVS, OTA slots

last change · 2026-11-22: rewritten as a STAR story
DONE

Tiny210 Information for development

My reading notes from the S5PV210 manual: address map, iROM/BL1/BL2 boot, boot block layout

last change · 2026-11-22: rewritten as a STAR story
DONE

Tiva ™ TM4C123GH6ZRB Microcontroller [part 1]

My reading notes from TI's datasheet: memory map, SRAM, flash, ROM, the ROM bootloader, EEPROM

last change · 2026-11-22: rewritten as a STAR story
DONE

Tiva ™ TM4C123GH6ZRB Microcontroller [part 2]

My reading notes on the Cortex-M4F core: modes, stacks, registers, memory model, exceptions

last change · 2026-11-22: rewritten as a STAR story
IN PROGRESS

My control library (ctl): PID to MPC, in simulation

A header-only C++ control library I wrote for small MCUs, and the demos that check every law against a plant instead of a promise

last change · 2026-11-22: hub page, four STAR write-ups re-run in double and float
IN PROGRESS

DC motor drive on a simulated bench

A brushed-motor drive stack (identify, tune, home, protect, fall back) run against a simulated H-bridge and encoder, six scenarios that assert their own numbers

last change · 2026-11-22: hub page, three STAR write-ups, re-run in double and float
IN PROGRESS

Plant models and fourteen small products

My act library of plants with the ugly parts switchable (backlash, stiction, delay, heat), and product-sized demos that drive them

last change · 2026-11-22: hub page, six STAR write-ups, all 14 demos re-run in double and float
IN PROGRESS

ESP32-S3 demo apps

Small ESP-IDF apps on my ESP32-S3 devkits: a fake USB webcam that plays video files, and every TinyUSB device demo checked from the PC side

last change · 2026-11-22: hub page with two STAR write-ups

Linux networking

§5 · where a packet actually goes
IN PROGRESS

Linux Packet Filtering

Where a packet goes inside the kernel: the five chains, the tables in each, conntrack, iptables and nftables

last change · 2026-11-22: rewritten as a STAR story
DONE

Linux Network Management

ifupdown, NetworkManager, systemd-networkd, Netplan and OpenWrt's netifd: who configures the interface after the driver

last change · 2026-11-22: rewritten as a STAR story
DONE

Virtual Interfaces in Linux

Bridge, VLAN, macvlan, ipvlan, veth, TUN/TAP, tunnels, VXLAN, WireGuard, dummy, bond: what each is and the ip commands

last change · 2026-11-22: rewritten as a STAR story
DONE

Lịch sử của Linux Wi-Fi Driver

Từ Wireless Extensions đến nl80211/cfg80211/mac80211: Wi-Fi driver trên Linux được thiết kế ra sao

last change · 2026-11-22: rewritten as a STAR story
DONE

Linux MacVLAN

Sub-interfaces with their own MAC: the four modes, and why the host can't reach them

last change · 2026-11-22: rewritten as a STAR story
DONE

Docker Networking

What each Docker network driver builds out of bridges, veth, macvlan and iptables

last change · 2026-11-22: rewritten as a STAR story

Linux general

§6 · tools and snippets I keep coming back to
DONE

Disk Partition Tables: MBR & GPT

MBR byte by byte on a test image, then GPT, the tools, and the layouts I use on boards

last change · 2026-11-22: rewritten as a STAR story
DONE

Linux Tips & Tricks

My scratchpad of shell one-liners: fstab, cleanup, time, git, sed, awk, find

last change · 2026-11-22: rewritten as a STAR story
DONE

Tmux Quick Reference

The tmux commands I actually use: sessions, panes, send-keys scripting, my tmux.conf

last change · 2026-11-22: rewritten as a STAR story
DONE

Udev Quick Reference

Ghi chép udev của mình: rule nằm đâu, thứ tự, ví dụ tắt touchpad khi cắm chuột, udevadm test

last change · 2026-11-22: rewritten as a STAR story
IN PROGRESS

Docker Snippet

Các lệnh Docker thường dùng

last change · 2026-11-22: rewritten as a STAR story
IN PROGRESS

Programming Language snippets

Các snippet code hay dùng

last change · 2026-11-22: rewritten as a STAR story