fpoussin / QStlink2

Cross-platform STLink v2 GUI
Other
187 stars 72 forks source link

Failure to flash on STM32F103RET7 #27

Closed Timvrakas closed 8 years ago

Timvrakas commented 8 years ago

System Connects correctly, but the flashing progress bar never starts to move. -v shows:

20459 - Info: Loader ":/bin/loader_f1.bin" 
20459 - Debug: ***[ qint32 stlinkv2::writeMem32(quint32, const QByteArray&) ]*** "Writing 128 bytes to 0x20000000" 
20460 - Debug: ***[ qint32 stlinkv2::writeMem32(quint32, const QByteArray&) ]*** "Writing 128 bytes to 0x20000080" 
20462 - Debug: ***[ qint32 stlinkv2::writeMem32(quint32, const QByteArray&) ]*** "Writing 128 bytes to 0x20000100" 
20463 - Debug: ***[ qint32 stlinkv2::writeMem32(quint32, const QByteArray&) ]*** "Writing 128 bytes to 0x20000180" 
20465 - Debug: ***[ qint32 stlinkv2::writeMem32(quint32, const QByteArray&) ]*** "Writing 98 bytes to 0x20000200" 
20465 - Info: Data is not 32 bit aligned! Padding with 2 Bytes
20466 - Debug: ***[ bool stlinkv2::writeRegister(quint32, quint8) ]*** 
20467 - Debug: ***[ quint32 stlinkv2::readRegister(quint8) ]*** 
20467 - Debug: Set register 15 to 20000000
20467 - Debug: ***[ void stlinkv2::runMCU() ]*** 
20468 - Debug: ***[ quint8 stlinkv2::getStatus() ]*** 
20468 - Info: "Loader uploaded" 
20568 - Debug: ***[ quint8 stlinkv2::getStatus() ]*** 
20668 - Debug: ***[ quint8 stlinkv2::getStatus() ]*** 
20769 - Debug: ***[ quint8 stlinkv2::getStatus() ]*** 
20870 - Debug: ***[ quint8 stlinkv2::getStatus() ]*** 

then there are just endless getStatus()

Thanks

fpoussin commented 8 years ago

Are you using a discovery board? If so, which one?

Can you post the full debug output?

Timvrakas commented 8 years ago

No, it is a custom application. I was able to get it to work with the official ST-Link Windows utility, and with st-flash on Linux. To program I am using a SWD dongle, and I only have the 4 basic pins broken out: SWD, CLK, Vcc, Gnd. Hence there is no debug data if that makes any difference.

On Jul 21, 2016 3:25 AM, "Fabien Poussin" notifications@github.com wrote:

Are you using a discovery board? If so, which one?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fpoussin/QStlink2/issues/27#issuecomment-234189057, or mute the thread https://github.com/notifications/unsubscribe-auth/ACZe9Pjdu0uE3M3XouVXthODsYWqMRL-ks5qXy0UgaJpZM4JRan6 .

fpoussin commented 8 years ago

I was talking about QSTlink2's debug output, you only posted part of it.

Is the reset pin wired to the debugger?

Timvrakas commented 8 years ago

Wow, OK, I went back to get the full debug script, and now it works fine. Very odd, it was failing under the same conditions earlier. Sorry to waste your time, I will come back if I figure out anything more.

fpoussin commented 8 years ago

No worries, let me know if you have any issues.