logo elektroda
logo elektroda
X
logo elektroda

Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

divadiow 33303 298
ADVERTISEMENT
  • #271 21711351
    p.kaczmarek2
    Moderator Smart Home
    This is what I have:
    Close-up of PCB labeled MINI-01_MAIN_V02 with date 2022-05-19
    Camera module labeled KXD-XTP-Z30-23-2020V1.0 on a wooden surface
    Camera module with flex cable on wooden surface, visible technical markings
    Camera module with lens and ribbon labeled KXP-STP-Z30 2020v1.0
    So board reads... MINI-01_MAIN_V02 2022-05-19 and camera... KXD-XTP-Z30-23-2020V1.0 ?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #272 21711381
    divadiow
    Level 38  
    Can't recall operation of I2C on XR872 build but I use it to get address to begin driver for new sensors. Worth adding I2C to XR and seeing if you can get address on any traced pins?
  • #273 21711393
    p.kaczmarek2
    Moderator Smart Home
    Sounds like too much hassle for manual checking, I will most likely just figure out a test driver that scans all permutations of available GPIO for I2C pairs.
    Helpful post? Buy me a coffee.
  • #274 21716905
    divadiow
    Level 38  
    hey look, here's the efuse tool retrieving some info from XF16 device. OBK is running at this point.

    Translated bits added too
    Screenshot of Efuse tool with chip model XR872 and MAC/Chip ID data enabled

    add extra things to read (eg secure boot) and this is the result
    Error message “device 405: Operation error, no valid data!” and Encode button

    Latest tool and API dll combination I could find attached as well as efuse tool PDF in Chinese and English.

    I wonder if the Kement XR872s have anything interesting to be read.

    Others supported:
    Screenshot with chip selection dropdown list, XR872 selected
    Attachments:
    • efuse_tool_2.1.0901_api3.2.zip (111.34 KB) You must be logged in to download this attachment.
    • XRADIO_Efuse_Tool_User_Guide-CN.pdf (481.37 KB) You must be logged in to download this attachment.
    • XRADIO_Efuse_Tool_User_Guide-EN.pdf (1.18 MB) You must be logged in to download this attachment.
  • Helpful post
    #275 21716910
    divadiow
    Level 38  
    efuse tool is sending the command efpg and some other bytes then getting back a <ACK> 200 OK and some bytes

    Added after 3 [minutes]:

    https://github.com/openshwprojects/OpenXR872/...de0b238e2c054265f88a9/include/efpg/efpg.h#L43

    Added after 18 [minutes]:

    unsurprisingly perhaps the key espgtest does not appear to be present in the Kement dumps
    List of binary files with paths, sizes, and programming error logs.

    the real key is proving elusive
  • ADVERTISEMENT
  • #277 21732314
    divadiow
    Level 38  
    insmod wrote:
    >>21349910 There is this: https://portrait.gitee.com/Dozingfiretruck/xr872_sdk/blob/master/project/example/jpeg/main.c
    But it looks like only for GC0308 and GC0328C sensors
    Attachments:
    • XR872_Jpeg_Developr_Guide-EN.pdf (746.03 KB) You must be logged in to download this attachment.
    • XR872_Jpeg_Developr_Guide-CN.pdf (534.75 KB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • Helpful post
    #278 21732686
    divadiow
    Level 38  
    Back to the XF16 A9 cam

    This is where each of the 18 pins trace to on this

    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

    Pad #FunctionXF16 IO
    1AVDD
    2SDAPA18
    3SCLPA17
    4PWDN/RESETPA14
    5DVP D7PA07
    6DVP D6PA06
    7DVP D5PA05
    8DVP D4PA04
    9DVP D3PA03
    10DVP D2PA02
    11VSYNCPA11
    12HSYNCPA10
    13MCLKPA09
    14GND
    15PCLKPA08
    16GND
    17DVP D0PA00
    18DVP D1PA01
    Attachments:
    • Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK camconnectorpins.jpg (5.73 MB) You must be logged in to download this attachment.
  • #279 21745299
    divadiow
    Level 38  
    building jpeg demo to try to bring up either GC0308 or GC0328C

    Code: Text
    Log in, to see the code
  • #280 21745740
    p.kaczmarek2
    Moderator Smart Home
    This may be interesting for you and camera testing - a multi-pin I2C scanner, tested only on ESP8266:
    
    bool canUsePin(int pin) {
    #if PLATFORM_ESP8266
       if (pin == 6) {
          return false;
       }
       if (pin == 7) {
          return false;
       }
    #endif
       return true;
    }
    

    I had to disable two pins there.
    
    startDriver MultiPinI2CScanner
    

    Correctly detects clock chip:
    ESP-12 connected to DS3231 RTC via I2C using GPIO4 and GPIO5
    System log screenshot showing I2C pins and address 0x68 highlighted
    Helpful post? Buy me a coffee.
  • #281 21746010
    divadiow
    Level 38  
    Yep cheers. I've an i2c scanner now (GPT creation) but no detection. I need to go back a step and get a working detection with non-camera like AHT20, so not relying on camera to be in correct state first. Get proven i2c detection code then go back to cam.
  • Helpful post
    #282 21746839
    divadiow
    Level 38  
    cool. it doesn't crash. going to take ages. I will wire up AHT20.

    Code: Text
    Log in, to see the code


    Added after 6 [minutes]:

    not sure i2c's been added to XR872 actually anyway.
    platforms.md needs i2c column

    Added after 1 [hours] 47 [minutes]:

    divadiow wrote:
    I will wire up AHT20



    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

    this was using PB02 and PB03 test pads

    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

    Added after 9 [hours] 49 [minutes]:

    just confirming IOs PA17 and PA18 are the two contacts next to AVDD for SDA/SCL as stated above on the XF16 A9 (I had AHT20 wired the other way round for scan below)

    Exploring A9 Minicam Variation: XF16 PB380EA6341 MCU, T25S80 SPI Flash, XR872, Skylark SDK

    Added after 14 [minutes]:

    also worth noting that the xr872_evb_ai board csi pinmux matches XF16

    board_config.c
    Code: C / C++
    Log in, to see the code


    but the default SDA/SCL does need tweaking for i2c0
    Code: C / C++
    Log in, to see the code
  • #283 21747580
    p.kaczmarek2
    Moderator Smart Home
    Well, this AHT20 I2C address does not look okay. Strange.

    I2C is done in software, it should run more or less on any platform. No specific timings are required there, it's not problematic as DS18B20.

    I also got false positives on some pin configurations.

    I added 24AA256 to my clock bus and redid scan:
    , MQTT 0(12), bWifi 1, secondsWithNoPing 129, socks 0/0 
    Info:I2C:Pins SDA = 4, SCL =5, adr 0x50 (dec 1)
    Info:MAIN:Time 199, idle 0/s, free 26780, MQTT 0(12), bWifi 1, secondsWithNoPing 130, socks 0/0 
    Info:I2C:Pins SDA = 4, SCL =5, adr 0x68 (dec 1)
    Info:I2C:Next SDA = 4, SCL =8
    Info:MAIN:Time 200, idle 0/s, free 26604, MQ
    

    Well.. 0x50
    Control byte format diagram with device addressing info for 24XX256 memory
    assuming all address pins are tied to ground...
    We'd get 0b1010000, and this is exactly 0x50 hex.
    Helpful post? Buy me a coffee.
  • Helpful post
    #284 21747599
    divadiow
    Level 38  
    p.kaczmarek2 wrote:
    Well, this AHT20 I2C address does not look okay. Strange.

    maybe not, but confirmation of something on those pins satisfied my current need.

    Added after 3 [minutes]:

    Here's another thing.

    An XF16 CSI connector pin walker. This confirms the remaining IOs in the table above.

    DVP module pinout diagram with test log showing GPIO pin signal states

    Prints ASCII connector x3 every 3s.
    Countdown to Pin#2
    High/Low/High/Low 5s each
    Pause to move probe
    repeat for next pin.

    A bit slow but you get to watch the multimeter dance around and it confirms OpenXR872 pin mappings.

    Close-up of FFC connector on green PCB with a measurement probe touching the pins
    Attachments:
    • XR872-XF16_A9_Cam_CSI_PinWalker.zip (41.93 KB) You must be logged in to download this attachment.
  • Helpful post
    #285 21748848
    divadiow
    Level 38  
    Confirmed all GPIOs with new firmware that detects and prints when each one is pulled low. So the below is correct. XR872 for comparison.

    Comparison of XF16 chip and XR872AT pinout diagram from XRADIO
  • Helpful post
    #287 21755503
    divadiow
    Level 38  
    the connectors on these cams and sensors appear to be standard 18-pin .5mm pitch FFC which can be used with various FFC connectors and ribbons from Ali

    Printed circuit board with flat ribbon cable connected, on blue background Close-up of FPC-18P 0.5 mm adapter with flat ribbon cable attached

    Close-up of AWM ribbon cable with exposed contact connector

    makes it even easier to confirm pins I guess. BK7252U48 next maybe
  • #289 21846798
    mateusz6768
    Level 9  
    >>21709811 Hmm, this looks familiar to my Setty wireless doorbell that I got in Biedronka not a while ago, as it has the same SoC and identical firmware that I could flash yours onto mine with no problems with booting and hardware functions as expected. If interested, I could also share the firmware dump of mine.
    Black PCB with connectors, wires, and a small battery on patterned fabric background Close-up of a black PCB with a camera lens, LED diodes, and a DC power jack on the right Black PCB with camera lens, LEDs and an antenna, held near a micro‑USB connector Disassembled device: white plastic case and black PCB with a USB port on patterned fabric Side of Setty package with specification list, barcode, and FSC label Wireless video doorbell set: camera unit, speaker receiver, and Setty box on a patterned carpet Device PCB with camera lens, USB-C port, and printed antenna pattern
  • #290 21847192
    divadiow
    Level 38  
    mateusz6768 wrote:
    If interested, I could also share the firmware dump of mine

    sure thing.
  • Helpful post
    #291 21847257
    mateusz6768
    Level 9  
    >>21847192 Here is the firmware dump of mine.
    Attachments:
    • setty-video-doorbell.bin (4 MB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #292 21859337
    divadiow
    Level 38  
    with eventual Easy Flasher XR read/write support in mind, here's the equivalent of going into PhoenixMC -> Flash ID button
    phoenixMC dialog with warning icon and text: “BROM version: 2” and “flash ID: 0xC840170000000000”

    Code: Text
    Log in, to see the code


    observed successful flashIDs
    ChipBROM versionFlagsFlashID payloadPhoenixMC GUI FlashID
    XR8090x010x0220 40 15 000x2040150000000000
    XF160x020x06C7 40 14 000xC740140000000000
    XR8720x020x06C8 40 17 000xC840170000000000
    XR8060x03/0X040x06EF 40 15 000xEF40150000000000

    FlashIDManufacturerChip
    20 40 15XMC16-Mbit SPI flash
    C7 40 14GigaDevice8-Mbit SPI flash
    C8 40 17GigaDevice64-Mbit SPI flash
    EF 40 15Winbond16-Mbit SPI flash


    FieldValue
    Sync55 → OK
    Request opcode0x18
    Response magicBROM
    Payload length4
    PayloadSPI flash JEDEC ID
    Attachments:
    • phoenixmc_getflashid_probe.zip (2.26 KB) You must be logged in to download this attachment.
  • Helpful post
    #294 21859487
    divadiow
    Level 38  
    as in, all operations - read/write etc?

    I'm pulling apart PhoenixMC code

    Screenshot of BK7231 Easy UART Flasher showing “Writing...” and a console log of flashing actions.
  • #295 21859493
    p.kaczmarek2
    Moderator Smart Home
    Oh, not bad, you're more advanced that I expected! Don't forget we also have Easy Flasher 2 - the web one.
    Helpful post? Buy me a coffee.
  • #296 21859893
    divadiow
    Level 38  
    p.kaczmarek2 wrote:
    you're more advanced that I expected!


    just basic first-steps so far.

    p.kaczmarek2 wrote:
    Don't forget we also have Easy Flasher 2 - the web one.


    indeed, but I got excited about XR in EF1 and couldn't help myself...
  • #298 21880376
    p.kaczmarek2
    Moderator Smart Home
    Nice, what's the BT issue ?
    Quote:

    Unfinished BT for XR806 (makefile/config problems)
    Helpful post? Buy me a coffee.
  • #299 21880609
    insmod
    Level 31  
    >>21880376
    It's not enabled, and i wasn't able to properly enable it (errors/undefined references). And it's not like anyone will be using it any time soo. XR806's are too rare, and dev boards haven't even reached ali yet.

    ADC can be marked as broken, every second measurement is 0 (with no errors, i checked).

    XR806 is very efficient compared to other chips. Usual power consumption on the T2‑U (converted to WXU) dev board at 4.65 V is 0.07 W when no MQTT and no main page or log are opened. It spikes to 0.18 W (assuming it reaffirms wifi connection) and reaches 0.23 W if any page is opened/updated.

Topic summary

✨ The discussion focuses on a variation of the A9 mini Wi-Fi camera featuring the XF16 PB380EA6341 MCU, an 8Mbit SPI flash chip labeled T25S80 (likely from ChipSourceTek), and the XR872 SoC running the Skylark SDK. Attempts to read and dump the flash firmware using tools like Flashrom, NeoProgrammer, and ASProgrammer faced challenges due to unrecognized SPI IDs and unreliable read/write operations, especially when the flash chip was in-circuit. Desoldering the flash chip improved read/write reliability. The firmware strings indicate the use of an RTOS and the iLnkP2P protocol for communication. The XR872 SDK (version 2.0 and later 1.2.x) was explored for building and flashing demo applications, including a "hello world" example, which successfully booted on the hardware after flashing via UART using PhoenixMC. Flashing custom firmware requires careful handling of flash erase and protection bits, with some users experiencing verification errors and random write failures. The flash layout includes an AWIH header and OTA partitions, with OTA updates compressed by XZ, raising concerns about fitting OTA images into the 1MB flash. Hardware details such as the presence of a pull-up resistor on the flash hold pin and UART pin configurations (PB02/PB03) were examined. The community also discussed the compatibility of different flash chip sizes (1MB vs 2MB) and the impact on firmware booting and flashing. Some users successfully transplanted firmware to larger flash chips (2MB) to run custom firmware like OpenXR872 (OBK). The discussion includes references to related projects for video stream capture without flashing (cam-reverse) and the challenges of flashing and booting custom firmware on these devices. Overall, the thread provides detailed technical insights into hardware probing, firmware extraction, SDK usage, flashing procedures, and troubleshooting for the XF16-based A9 mini camera variant with XR872 SoC.
Generated by the language model.

FAQ

TL;DR: With 1MB stock flash, many XF16 A9 cameras can be dumped and restored over UART, and one contributor confirmed "OpenXR872 ... boots on 1mb flash" only after fixing the image layout. This FAQ helps XR872/XF16 camera owners back up firmware, understand AWIH partitions, fix PhoenixMC/UART issues, and avoid bad SPI-flash writes. [#21530564]

Why it matters: XF16 A9 cameras look identical externally, but small changes in flash size, OTA layout, console settings, and sensor wiring decide whether firmware boots, flashes, or bricks.

Method What works best Main strengths Main failure mode
PhoenixMC over UART Read/write on XF16/XR872 without opening some A9 units No desoldering; can restore stock dumps Custom builds may lose UART flashing after power cycle if console support is wrong
CH341A + SOIC8 clip Quick first dump attempts Cheap; widely available In-circuit reads often return bad IDs like 1313 or 8E8029
CH341A with desoldered flash Most reliable SPI backup/restore Stable verification; works with replacement chips Some flash chips still fail erase/write unless decoupling is added
Bus Pirate Usually poor choice here Can talk SPI/UART Backfeeds power and often fails chip detection

Key insight: The hardest XF16 problems were not caused by the XR872 core. They came from image layout, OTA header placement, console enablement, and fragile SPI flash behavior on specific 1MB chips.

Quick Facts

  • XF16 boot logs repeatedly report 240000000 Hz CPU, 40000000 Hz HF clock, and XRADIO Skylark SDK builds such as 1.2.0 Jun 20 2024 10:58:31 or 1.2.2 test builds, which makes the platform easy to fingerprint from UART alone. [#21219273]
  • The stock A9 XF16 camera flash is commonly 8 Mbit / 1 MB with IDs such as C74014 or 5E3214, while test replacements that booted OpenXR872 included 2 MB and even 64 Mbit chips. [#21522966]
  • UART flashing can work through the camera’s USB path on some XF16 A9 boards because RX/TX are routed through the USB connector traces; contributors built simple USB-TTL adapters from NodeMCU or CH340 hardware to exploit that. [#21528571]
  • The stock firmware exposes a local AP at 192.168.238.1/24, while OpenXR872 test builds used 192.168.51.1/24 or 192.168.4.1/24, so IP range alone can reveal whether you are in factory or custom firmware. [#21219273]
  • Confirmed XF16 camera-connector tracing mapped SDA/SCL to PA18/PA17, PCLK to PA08, MCLK to PA09, HSYNC to PA10, VSYNC to PA11, and DVP data lines across PA00–PA07. [#21732686]

How can I dump and restore firmware on an XF16 A9 minicam with a T25S80 or C74014 SPI flash chip using a CH341A, clip, or PhoenixMC over UART?

You can dump and restore XF16 firmware either over SPI or over UART. 1. For SPI, clip or desolder the 8-pin flash, then read it with a CH341A in NeoProgrammer, ASProgrammer, or EasyFlasher. 2. For UART, connect through the XF16 USB-routed RX/TX path and use PhoenixMC to read or flash without opening some cameras. 3. Always verify the dump and keep at least one known-good stock backup before testing OpenXR872. One contributor confirmed they clipped directly onto the flash and did not need reset mode first. [#21278253]

Why do some XF16 A9 cameras report strange SPI flash IDs like 1313, 8E8029, C74014, or 5E3214 when reading the flash in-circuit?

Those odd IDs usually mean the in-circuit SPI read is unstable, not that the chip is truly changing identity. The thread showed 1313, 8E8029, and then stable C74014 on the same 1MB camera, while a desoldered read later became consistent and verified correctly. Shared power rails, leakage from the rest of the board, bad clip contact, and marginal CH341A supply decoupling all caused false IDs. A clean off-board read or UART dump was much more trustworthy than an in-circuit first pass. [#21522287]

What is the AWIH header in XR872/XF16 firmware dumps, and how can it help identify image sections like boot, app, app_xip, and wlan_fw?

"AWIH is a firmware image header that marks XR/XF system images, stores image metadata, and helps separate boot, app, XIP, and WLAN sections." In this thread, contributors matched AWIH-tagged section IDs such as 0xa5ff5a00, 0xa5fe5a01, 0xa5fd5a02, 0xa5fa5a05, and 0xa5f95a06 to boot_40M.bin, app.bin, app_xip.bin, wlan_bl.bin, and wlan_fw.bin. Searching a dump for those little-endian markers was enough to start slicing it for Ghidra or manual comparison. [#21589985]

What is iLnkP2P on these A9 and PTZ cameras, and how is it related to the YSX/YSXLite apps and cam-reverse tools?

"iLnkP2P is a peer-to-peer camera transport protocol that carries control and media traffic, identifies devices with UIDs, and lets mobile apps reach cameras through local AP mode or relay servers." These XF16 and PTZ cameras logged IpcP2pStart, device rtuid, and p2pID, then worked with YSX or YSXLite. The same protocol is what cam-reverse and related reversing notes target, including video extraction and CGI-style control. Multiple posts linked the protocol directly to the apps and to the reverse-engineering workflow. [#21353025]

Why did OpenXR872 boot on a 2MB flash chip but initially fail on the stock 1MB flash chip in the XF16 A9 camera?

It failed because the early image layout still assumed space beyond the stock 1MB boundary. The same OpenXR872 image booted when the original dump was transplanted to a 2MB flash chip, but not on the original 1MB flash. That exposed a layout problem rather than a CPU or sensor problem. The boot logs showed image max size is invalid and missing XIP section errors on the 1MB setup, while the 2MB chip could tolerate the oversized placement. [#21525075]

How was the 1MB XF16 boot issue solved by changing the OpenXR872 image configuration and OTA header placement?

The fix was to shrink the effective image layout for 1MB flash and move the OTA header out of the failing location. First, contributors rebuilt with max_size around 880K. Later they proved that a no-OTA image booted on 1MB stock flash, then refined the layout so the OTA header sat at 1020K with 4K size instead of the breaking 1024K arrangement. After that, 1MB XF16 boards booted OpenXR872 normally. As one post put it, “ota was the problem.” [#21530564]

Why does UART flashing through PhoenixMC stop working on some OpenXR872 builds after a power cycle, and how was PRJCONF_CONSOLE_EN involved in fixing it?

UART flashing stopped because the custom build no longer exposed the console command path that PhoenixMC uses after reboot. The breakthrough was enabling #define PRJCONF_CONSOLE_EN 1, which restored the upgrade command path and made Open comm OK ! survive fresh power cycles on 1MB XF16 boards. Before that fix, some builds could still be reflashed only until RAM state was lost, which made the problem look random. After the console option was re-enabled, PhoenixMC download-mode entry became reliable again. [#21536774]

CH341A vs Bus Pirate vs PhoenixMC over UART — which works best for reading and flashing XF16/XR872 camera firmware, and what problems should I expect with each?

PhoenixMC over UART is the best day-to-day method on XF16 once stock firmware or a console-enabled OpenXR872 build is present. CH341A is best for first-rescue backups, off-board writes, and recovery when UART entry is gone. Bus Pirate was the worst performer here: users reported non-detection, backfeeding power, and brief LED power-up when clipped in. CH341A also had pitfalls, especially with sensitive 1MB chips, but it still worked reliably after desoldering or after adding extra capacitance. [#21352083]

How do I enter XR872/XF16 download mode over UART without grounding PB02 or PB03, and what commands does PhoenixMC actually send?

You do it by speaking the stock console protocol, not by forcing strap pins low. PhoenixMC sends the text command upgrade, then repeated U sync bytes; a receptive firmware answers with OK and a BROM response. Later reversing tied that behavior to the XR command handler where cmd_upgrade_exec() reboots with PRCM_CPUA_BOOT_FROM_SYS_UPDATE. That is why stock firmware and console-enabled OpenXR872 can enter download mode over UART without grounding PB02 or PB03 at all. [#21534886]

What does the XRADIO Skylark SDK boot log tell me about an XF16 camera, including CPU clock, flash mode, sensor detection, and network behavior?

The boot log gives you the board fingerprint in one place. It exposes flash mode like [FD I]: mode: 0x4, CPU at 240000000 Hz, HF clock at 40000000 Hz, SDK build date, MAC addresses, sensor probe results such as detect sp0828, and AP behavior such as 192.168.238.1 on stock firmware. It also shows whether the camera starts in AP mode, tries STA mode, fails SD mount, or enters iLnkP2P. For XF16 debugging, the UART log is the fastest way to identify variant, sensor, and failure stage. [#21219273]

How can I build XR872 SDK demos under WSL, and which toolchain and 32-bit libraries are needed to compile hello_demo or jpeg examples successfully?

Builds under WSL worked after installing the older ARM GCC toolchain plus missing 32-bit runtime libraries. The thread used gcc-arm-embedded 4.9-2015-q2-update, then fixed execution errors by installing libc6-i386, lib32z1, and lib32stdc++6. Without those, WSL reported missing loader errors even when the path was correct. Once the 32-bit compatibility packages were installed, make lib and example builds such as hello_demo started compiling normally. [#21522159]

Why do some SPI flash chips like TJ25Q08M, T25S80, or 25QH32CHIG fail erase/write verification in NeoProgrammer or EasyFlasher unless extra capacitance or special handling is used?

These chips appear unusually sensitive to supply stability during SPI writes. The thread documented random verify errors, partial writes, and false erases on desoldered chips until extra capacitance was added directly on the CH341A setup; after that, the same chip verified cleanly. One test with a 25QH32CHIG failed repeatedly, then passed once a capacitor was added across the supply. Some users also had to experiment with protection-register handling, but the strongest repeated fix was better decoupling on the programmer side. [#21709832]

How can I trace the 18-pin FFC camera connector on an XF16 A9 board to map SDA, SCL, DVP data pins, MCLK, HSYNC, VSYNC, and PCLK to XR872 GPIOs?

The cleanest method is continuity tracing plus a pin-toggle test firmware. On the confirmed XF16 A9 mapping, pin 2 is SDA on PA18, pin 3 is SCL on PA17, pin 13 is MCLK on PA09, pin 12 is HSYNC on PA10, pin 11 is VSYNC on PA11, pin 15 is PCLK on PA08, and DVP data runs from PA00–PA07. Contributors validated the map with an 18-pin FFC walker that pulsed each GPIO while a multimeter watched the connector. [#21732686]

Which camera sensors seem to be supported or referenced in XF16/XR872 firmware strings, and how can I start adapting drivers for parts like SP0828, GC0328C, GC0329, or HI0704?

The firmware strings reference many sensors, including ov9660, ov7740, sp2518, gc0310, gc0328, gc0329, hi0704, hi0708, and sp0828. Start by reusing initialization tables and SCCB/I2C setup from the closest supported driver, then confirm the actual sensor with ribbon markings or UART detection logs. For XF16 A9 specifically, sp0828 was repeatedly detected in stock logs, while separate posts confirmed useful initialization arrays existed for hi704-class parts. That makes driver adaptation a sensor-data problem more than a core XR872 problem. [#21547719]

How can I split or parse a stock XF16 firmware dump into PhoenixMC-style partitions for reverse engineering in Ghidra, and where does mkimage fit into that process?

Use the AWIH section markers and the XR image config as your map, then reverse from there. Search the dump for little-endian IDs like 005affa5, 015afea5, 025afda5, 055afaa5, and 065af9a5 to locate boot, app, app_xip, wlan_bl, and wlan_fw boundaries. The SDK’s mkimage.exe is the packer that assembles those partitions into one AWIH image, so it is the right binary to study if you want PhoenixMC-style slicing for Ghidra. The thread specifically identified mkimage.exe as the image-creation step. [#21587062]
Generated by the language model.
ADVERTISEMENT