logo elektroda
logo elektroda
X
logo elektroda

C-SKY Flash Programmer with STM32 CK-Link Lite: Reading/Writing to Taixin TXW817-810 MCU

divadiow 825 2
ADVERTISEMENT
📢 Listen (AI):
  • The C-SKY Flash Programmer is a piece of software supplied for download by XuanTie at https://www.xrvm.cn/community/download?id=4425633167990394880
    Screenshot of the Xuantie website with a download panel for the Jianchi Development Toolset and FlashProgrammer Tool V1.0.15.

    This tool works with CK-Link programmers to read and write to the flash memory in C-Sky's proprietary RISC core CPUs. CPUs based on C-SKY architecture include the WinnerMicro W800, W801 and W806 - XT804/CK804 type. TaiXin Semiconductor's TXW8xx are also based on C-SKY architecture - the CK803.

    To make your own CKLink Lite using a cheap STM32F103 board see this thread: https://www.elektroda.com/rtvforum/topic4120455.html or cloned cheap ready-made CK-Link boards can be bought on sites like Ali Express. There's also the official tool, for a price
    CkLink Lite programmer and debugger in a black case with white text.

    Here I will demonstrate the process to read and write to a TXW817-810 - a 1mb Taixin chip seen in many cheap A9/X5/X6 type mini cams.

    When PR is merged C-SKY Flash Programmer can be downloaded from https://github.com/openshwprojects/FlashTools/tree/main/C-SKY

    Initial run of the program after install:
    Screenshot of FLASH PROGRAMMER software interface for programming flash memory.

    To read device flash, an algorithm .elf file needs to be specified. Currently I have working TXW81x and W806 elf files tested, attached.
    Navigate to Advance
    Configuration window of a programming tool for microcontrollers, showing algorithm file setup, erase type, and log options.

    Under the read tab change to Bin programmer, set a save path for flash read and choose appropriate length for the flash in the target device
    Screenshot of a memory reading software interface with file type and save path options.

    Under "Local JTAG" tab set ICE Clk to 1200Khz
    Advanced settings screen for Local JTAG interface with checked options and input fields.

    Code: Text
    Log in, to see the code


    With the CK-Link device connected, which in the case of the Taixin chips is through PA9 (DebugCLK) -> CKLink SCK and PA10 (DebugIO) -> CKLink DAT
    Excerpt from technical documentation in Chinese about the TXW81x debug port.
    Code: Text
    Log in, to see the code

    Example device - X6 cam

    Printed circuit board with microSD slot and labeled debug and signal pins.

    Here's that cam connected to STM32 running as a CK-Link Lite
    GND - GND
    PA10 - STM32 A1
    PA9 - STM32 A5
    power via 5v micro-USB

    Microcontroller programmer connected by wires to a PCB with an SD card reader.

    Click the Read, not Start, button to dump flash under the Read tab
    Screenshot of a program window for reading a binary file via JTAG interface.

    Progress
    Screen with Please wait... message, data read info, and a Cancel button.
    Completion
    Dialog window with Information message, indicating success and an OK button.



    To write a flash file leave the Advance section and come back to main screen. Here I'll flash the Taixin demo firmware txw81x_v2.5.2.6-31320_2025.5.25_IOT_AT_PC6-PC7.bin available from https://github.com/openshwprojects/FlashDumps/tree/main/IoT/TXW817

    Highlight the box labelled Hex and click REMOVE. Add a Bin type from the ADD button. Specify file to be flashed and to flash from 0x0. In the Advance menus I have chosen to Chip Erase the whole flash under Erase Type. Start button at the bottom begins flash
    Flash programmer window with selected binary file path and programming and verification options enabled.

    Flash Programmer window with a Please wait… message during programming data.

    On next boot I can see from the output on TX/PC7 that it is the demo firmware booting
    Code: Text
    Log in, to see the code


    And flashing back my backup results in a working original firmware again.

    Cool? Ranking DIY
    About Author
    divadiow
    Level 34  
    Offline 
    divadiow wrote 2976 posts with rating 508, helped 262 times. Live in city Bristol. Been with us since 2023 year.
  • ADVERTISEMENT
  • Helpful post
    #2 21561305
    divadiow
    Level 34  
    Regarding the TXW806, also CK803, it appears PA8 and PA9 should be used instead of PA9/PA10. From TXW80X Mass production and programming guide.pdf at https://github.com/divadiow/DataSheets/tree/main/Taixin we see:
    Table showing pin assignments between TXLink Lite and Target, listing five signal pairs.

    This also may explain why the pad labels in the example above appears to be incorrect for the TXW817. If TXW817 is a drop-in replacement for TXW806 maybe the boards were labelled for and originally made for use with TXW806.

    TXW80x flash algorithm elf https://github.com/divadiow/FlashTools/tree/main/C-SKY - not tested
  • #3 21563820
    divadiow
    Level 34  
    and of course WinnerMicro W80x can be dumped in this app too if start address is correctly set
    Screenshot of a memory reading program showing binary file save settings.
📢 Listen (AI):
ADVERTISEMENT