Skip to content

Commit

Permalink
Fix for STM32L0
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoussin committed Dec 11, 2015
1 parent 126e584 commit 01b43bd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion QStlink2.pro
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ win32:CONFIG += winusb

TEMPLATE = app
TARGET = qstlink2
VERSION = 1.2.1
VERSION = 1.2.2

message(Building version $$VERSION for Qt $$QT_VERSION)

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ It can perform the following actions:
**Downloads**

Windows binaries:
- https://drive.google.com/folderview?id=0BzWyTGWIwcYQS0JRQkw2Q3J6R1U&usp=sharing
- https://github.com/fpoussin/QStlink2/releases

Ubuntu PPA:
Expand Down
1 change: 1 addition & 0 deletions inc/stlinkv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ namespace STM32 {
namespace Cortex {
namespace CoreID {
const quint32 M0_R0 = 0x0BB11477; /**< TODO: describe */
const quint32 M0_R1 = 0x0BC11477; /**< TODO: describe */
const quint32 M3_R1 = 0x1BA00477; /**< TODO: describe */
const quint32 M3_R2 = 0x4BA00477; /**< TODO: describe */
const quint32 M4_R0 = 0x2BA01477; /**< TODO: describe */
Expand Down
6 changes: 5 additions & 1 deletion src/stlinkv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ quint32 stlinkv2::getCoreID()
QByteArray buf;
this->debugCommand(&buf, STLink::Cmd::Dbg::ReadCoreID, 0, 4);
mCoreId = qFromLittleEndian<quint32>((uchar*)buf.constData());
qInfo() << "CoreID:" << QString::number(mCoreId, 16);
qInfo("CoreID: %03X", mCoreId);
return mCoreId;
}

Expand All @@ -180,6 +180,10 @@ quint32 stlinkv2::getChipID()
this->readMem32(&buf, Cortex::Reg::CM0_CHIPID);
qInfo("CM0 Searching at %08X", Cortex::Reg::CM0_CHIPID);
}
else if (mCoreId == Cortex::CoreID::M0_R1) {
this->readMem32(&buf, Cortex::Reg::CM0_CHIPID);
qInfo("CM0+ Searching at %08X", Cortex::Reg::CM0_CHIPID);
}
else {
this->readMem32(&buf, Cortex::Reg::CM3_CHIPID);
qInfo("CM3/4 Searching at %08X", Cortex::Reg::CM3_CHIPID);
Expand Down

0 comments on commit 01b43bd

Please sign in to comment.