Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add XTW100 support #47

Merged
merged 1 commit into from
Oct 25, 2020
Merged

Add XTW100 support #47

merged 1 commit into from
Oct 25, 2020

Conversation

swiftgeek
Copy link
Contributor

@swiftgeek swiftgeek commented Sep 30, 2020

Board pictures and PDF

XTW100-25xx-programmer

Would it be better to create xtw100.c and place all the hooks there with vserprog.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 stm32f103

Personally 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

@mytbk
Copy link
Contributor

mytbk commented Oct 25, 2020

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.

@dword1511 dword1511 merged commit 9d9aa14 into dword1511:master Oct 25, 2020
@Droid-MAX
Copy link

Droid-MAX commented Oct 31, 2020

how to flash hex file into mcu? need short any pins?
Found swd upgrade pins, thx!

@Droid-MAX
Copy link

Does it can flash i2c eeprom chip?

@lss4
Copy link

lss4 commented Jan 1, 2021

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...

@lss4
Copy link

lss4 commented Jan 21, 2021

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...

@swiftgeek
Copy link
Contributor Author

swiftgeek commented Jan 21, 2021

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

@lss4
Copy link

lss4 commented Jan 21, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants