FAQ
TL;DR: Moving the OTA header to 1 020 KB restores boot on 1 MB chips and keeps UART flashing functional (100 % success in tests) [Elektroda, divadiow, post #21530564] “HTTP OTA worked for me.” [Elektroda, insmod, post #21590642]
Why it matters: these tweaks stop A9/XF16 cameras from bricking after custom firmware uploads.
Quick Facts
• Flash sizes seen: 1 MB, 2 MB, 8 MB GD25Q64 [Elektroda, divadiow, post #21590664]
• Valid image markers (LE): 005AFFA5 boot, 015AFE A5 app, 025AFD A5 XIP etc. [Elektroda, divadiow, post #21589985]
• Safe UART baud for PhoenixMC: 921 600 bps, HW-reset mode ticked [Elektroda, p.kaczmarek2, post #21531441]
• OTA reserved: 4 KB starting 1 020 KB (1 MB flash) or 880 KB on 2 MB+ [Elektroda, insmod, post #21587276]
• Typical XR872 boot heap free: 262 kB SRAM, 240 MHz CPU [Elektroda, divadiow, post #21587381]
Which A9 mini-cams contain the XR872/XF16 MCU?
Units labelled “XF16 PB380EA6341” on the PCB and reporting XRADIO Skylark SDK 1.2.x at boot use the XR872 core [Elektroda, divadiow, post #21219273]
Why did early OpenXR872 builds fail on 1 MB flashes?
Images stored the OTA header at 1 024 KB, overlapping memory; bootloader rejected them. Relocating the header to 1 020 KB or removing OTA lets the 1 MB device start normally [Elektroda, insmod, post #21587276]
How can I slice a stock firmware dump into its parts?
Search the file for little-endian IDs: 005AFFA5 (boot), 015AFE A5 (app), 025AFD A5 (app_xip), 055AFAA5 (wlan_bl), 065AF9A5 (wlan_fw), 075AF8A5 (wlan_sdd) and cut at these offsets [Elektroda, divadiow, post #21589985]
Best way to back-up or restore flash without soldering?
Clip the SOIC-8 with a CH341A programmer; PhoenixMC UART also works if the camera still boots. A full 1 MB read takes ≈25 s at 921 600 bps [Elektroda, p.kaczmarek2, post #21522287]
What UART command puts the XR872 in download mode?
PhoenixMC sends the plain ASCII string “upgrade” followed by 50 ‘U’ characters. A responsive build echoes “OKBROM” and resets into the boot ROM [Elektroda, divadiow, post #21534886]
Why does UART flashing stop after power-cycle?
Builds compiled with PRJCONF_CONSOLE_EN 0
ignore the “upgrade” command after reboot; enabling the flag restores indefinite UART flashing capability [Elektroda, divadiow, post #21536774]
Is HTTP OTA functional?
Yes. On a 2 MB board an OTA image of 430 KB uploaded in 6 s and auto-rebooted successfully [Elektroda, divadiow, post #21590664]
Which camera sensors are referenced in stock code?
Strings list at least 18 types, e.g., GC0328, GC0329, HI0704, SP0828, OV7740 and SC101 [Elektroda, divadiow, post #21547719]
How do I map GPIOs on the 68-pin XF16?
Refer to XR872 Port A/B/C counts (24+22+13). Then trace each pad: PA21 drives the blue LED, PB02/PB03 are boot-select, PA06/PA07 = UART, PC pins unused on A9 board [Elektroda, p.kaczmarek2, post #21575973]
Edge case: camera stuck with red LED only?
Disconnect the Li-ion pack; some samples boot only on USB 5 V without battery load, then broadcast AP normally [Elektroda, p.kaczmarek2, post #21528163]
Statistic: how much heap is left after Wi-Fi joins?
On 1 MB flash build _xradios_30beb8223658
heap free stabilises at 254 kB after MQTT connect [Elektroda, divadiow, post #21587381]
How to flash via SPI when UART is dead?
Desolder the flash or use a Pomona clip and program with CH341A; identify chips like C74014 (TJ25Q08M) or GD25Q64 and write the full .img
[Elektroda, divadiow, post #21530504]
Procedure: enable PWM on PA21 for status LED
- In Web UI set Pin to PWM and choose channel 1. 2. Issue
pwm 21 50
to set 50 % duty. 3. Save config, LED brightness now tracks PWM [Elektroda, divadiow, post #21587381]
Failure fact: what bricks XR806 boards?
Flashing pre-1.2.1 SDK images with DC-DC mode enabled on USB-C 5 V can fry the regulator; XR872 uses LDO by default, avoiding this issue [Elektroda, insmod, post #21587386]