Closed swiftgeek closed 4 years ago
Good job! This is the working patch for XTW100. I've tested on some off-board flash chips and in-system programming on some boards.
how to flash hex file into mcu? need short any pins? Found swd upgrade pins, thx!
Does it can flash i2c eeprom chip?
Just got myself a XTW100, but the new one has 5 ISP pins instead of 4. The pins are labeled as (from the one closest to the lever) N, E, T, R, G.
EDIT: I'm able to find some hints. However, I still need to dig deeper to figure out what I need to get this one working, or look for the variant that can already do SWD...
Say does st-flash
still work on this? Recently I acquired another board that has SWD pins, but when I try flashing with st-flash
(using a ST-Link v2) I got a "Flash loader run error", although erase/mass erase works.
Googling about that error returns a good amount of issues regarding it (such as this and this). With the latest st-flash built from git master it mentioned some details about the error (R2 0x00000000 R15 0x00000000 DHCSR 0x01010001 DFSR 0x00000001
)
It seems the MCU on this board is a bit different as with earlier st-flash
versions it complained about not knowing what to do due to coreid: 2ba01477, chipid: 410
which was mentioned in this issue.
Will keep investigating. Maybe I should look for a way to upgrade the ST-Link itself as I don't know which firmware version it's on yet...
You need to do mass erase/unprotect mcu first, st-flash often behaves strangely when protection is enabled
I guess maybe openocd can do it with stm32f1x unlock
https://stackoverflow.com/questions/32509747/stm32-read-out-protection-via-openocd
Yeah, it's indeed protected. I ended up hooking it on a Windows machine and disabled it using the official ST-Link utility. After disabling the protection I'm able to properly flash it. It's working now.
Board pictures and PDF
Would it be better to create
xtw100.c
and place all the hooks there withvserprog.c
having weak functions? Or is current version enough for vserprog?In any case it works reliably, was testing it for past week (read/write/erase)
Used
make BOARD=xtw100 flash-stlink
with success to flash stm32f103Personally I would not recommend this dongle, because it powers target chip/board through GPIO, which can easily end badly for the stm32f103
Tested mostly with W25Q128FVSIG, MX25L25635F