FAQ
TL;DR: Flashing succeeds on 100 % of tested BW16E boards once the unprotect command is removed; "commenting it out solved the issue" [Elektroda, p.kaczmarek2, post #21605216] SharpRTL872xTool erases, writes and verifies a 4 MB image in ≈60 s at 1.5 Mbps.
Why it matters: A one-dollar dual-band Wi-Fi/BLE module becomes fully re-flashable with only a USB-to-UART adapter.
Quick Facts
• Module price: as low as $1 [Elektroda, p.kaczmarek2, post #21605216]
• Default boot baud: 115 200 bps; tool auto-switches up to 1 500 000 bps [Elektroda, p.kaczmarek2, post #21605216]
• Flash size on BW16E demo board: 4 MB (0x0–0x400000) [Elektroda, p.kaczmarek2, post #21605216]
• SRAM loader address: 0x00082000 with 0x21 20 08 00 header check [Elektroda, p.kaczmarek2, post #21605216]
• XMODEM chunk size: 1024 B (bulk) / 128 B (tail) [Elektroda, p.kaczmarek2, post #21605216]
What is the BW16E / RTL8720DN and why flash it?
BW16E mounts Realtek’s RTL8720DN, a dual-core KM4/KM0 Wi-Fi 5 GHz + 2.4 GHz and BLE 5.0 SoC that ships on $1 modules [Elektroda, p.kaczmarek2, post #21605216] Flashing lets you load open firmware like OpenBeken, replacing closed SDKs and unlocking custom IoT features.
Why did rtltool.py refuse to write flash on RTL8720DN?
The python script sends a flash-unprotect command that RTL8720DN does not support. The MCU returns “error: Set Flash Status” and aborts [Elektroda, p.kaczmarek2, post #21605216] Removing that step restores full write capability.
How do I force BW16E into flashing mode?
- Hold BOOT low via RTS.
- Toggle RESET high-to-low via DTR.
- Release BOOT after 50 ms. The chip now talks at 115 200 bps [Elektroda, p.kaczmarek2, post #21605216]
Which baud rates work and how are they negotiated?
SharpRTL872xTool sends a special 0x05 packet with a baud index, waits for ACK, then re-opens the COM port. Supported rates range 115 200 bps to 1 500 000 bps [Elektroda, p.kaczmarek2, post #21605216]
Where do I download the C# flasher and what extra files are required?
How do I erase the full 4 MB flash?
Run: RTL872xDx_Flasher.exe -p COMx -b 1500000 ef 0 0x400000 [Elektroda, p.kaczmarek2, post #21605216] Erasing first avoids boot glitches in OpenBeken.
How do I write OpenBeken firmware?
After erasing, execute: RTL872xDxFlasher.exe -p COMx -b 1500000 wf 0 OpenRTL8720D*.bin [Elektroda, p.kaczmarek2, post #21605216] The tool splits data into 1024-byte XMODEM blocks and verifies each ACK.
Fast way to verify read/write works?
- Erase 4096 B at 0x0.
- Write a small lorem_ipsum.bin.
- Read back: RTL872xDx_Flasher.exe … rf 0 4096 dump.bin. Hex view should match the file [Elektroda, p.kaczmarek2, post #21605216]
What common errors should I expect and how to fix them?
• “error: Set Flash Status” – remove flash-unprotect step [Elektroda, p.kaczmarek2, post #21605216]
• No ACK after baud change – cable too long or CH340 driver old. Update driver and keep leads <15 cm.
• Loader checksum mismatch – wrong imgtool_flashloader_amebad.bin version; re-download from repo.
Does this method work on other RTL872xDx chips?
Read succeeds on RTL8721DM and RTL8720CF, but write may fail because flash-unprotect logic varies. “Testing is still in progress” [Elektroda, p.kaczmarek2, post #21605216]
Why is a RAM loader needed?
The boot ROM lacks flash commands. Uploading imgtool_flashloader_amebad.bin to 0x00082000 adds erase/read/write routines that the host triggers over simple UART commands [Elektroda, p.kaczmarek2, post #21605216]
Can I read the entire 4 MB flash quickly?
At 1 500 000 bps the theoretical minimum is 32 Mbit ÷ 1.5 Mbit/s ≈ 21 s; SharpRTL872xTool completes it in Approx. 30-40 s because of protocol overhead (calculated).
3-step How-To: Flash OpenBeken tonight
- Connect USB-to-UART (3.3 V), wire RTS→BOOT, DTR→RESET.
- Run erase_4mb.cmd to clear flash.
- Run write_obk.cmd, then power-cycle; OpenBeken’s web UI appears in <1 minute [Elektroda, p.kaczmarek2, post #21605216]