2026 dongle: own firmware for the USB nRF24 stick, wire-free USB flashing
Reverse-engineered the AliExpress "USB_24RF Ver3.1" stick (STM32F030F4P6 +
Si24R1 + AT2401C PA + CH330N) and replaced its closed AT-command firmware so it
can be the PC-side radio for the hexapod.
- Pin map found over SWD and confirmed at runtime: USART1 PA9/PA10 (CH330N),
SPI1 PA5/6/7, nRF CSN PA3 / CE PA4 / IRQ PA2. LED + AT2401C control are among
the 5 free pins, still to map.
- Two-stage firmware so wire-free flashing can't be broken by an app update:
- safeboot (4 KB, pages 0-3): permanent recovery bootloader, fixed-baud flash
protocol over USB, only it survives every update;
- app (12 KB, pages 4+): the radio firmware, the only part updates rewrite.
The app updater never erases safeboot; recovery works even with a dead app.
- tools/dongle_flash.py: one-time install via the STM32 ROM bootloader (the only
time the BOOT0 wire is used). tools/safeboot_flash.py: wire-free app updates.
- dongle/README.md documents the hardware, pin map, RDP1 (factory fw can't be
dumped), the memory map and the flashing workflow.
- README: add dongle/ to the layout and the PC-radio plan.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f9655d646
commit
97f580b6a5
12 files changed
+885
-10
No files matched your search
@@ -0,0 +1,18 @@
|
||||
/* app: flash pages 4-15 (12 KB) after safeboot. RAM starts at +4 so the magic
|
||||
* word at 0x20000000 (used to signal safeboot) is left alone. */
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08001000, LENGTH = 12K
|
||||
RAM (rwx) : ORIGIN = 0x20000004, LENGTH = 4092
|
||||
}
|
||||
_estack = 0x20001000;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.isr_vector : { KEEP(*(.isr_vector)) } > FLASH
|
||||
.text : { *(.text*) *(.rodata*) . = ALIGN(4); } > FLASH
|
||||
_sidata = LOADADDR(.data);
|
||||
.data : { . = ALIGN(4); _sdata = .; *(.data*) . = ALIGN(4); _edata = .; } > RAM AT > FLASH
|
||||
.bss : { . = ALIGN(4); _sbss = .; *(.bss*) *(COMMON) . = ALIGN(4); _ebss = .; } > RAM
|
||||
/DISCARD/ : { *(.ARM.exidx*) *(.ARM.extab*) }
|
||||
}
|
||||
Reference in new issue
Block a user