Problem with Nucleo STM32F103
woeimun opened this issue · 7 comments
I have downloaded the QStink2-1.1.3 for linux.
After unzipping it, I had an error with qmake. And I found that the QtUsb directory is empty. I downloaded your QtUsb project and unzip it into the directory, than I can go forward with qmake and make.
Tested with STM32F103, Qstink2 detected and made connection. But it fail to fetch MCU info and claims "Device not found in Database"
Can you provide the debug output ?
Hi fpoussin,
I am not sure what you mean by debug output:
But run the program from command line and this is the error list:
"Verbose level: 3
73 - Info: Devices list loaded.
2981 - Info: Cannot open device
3282 - Info: libusb_bulk_transfer Error reading: -7
3282 - Info: LIBUSB_ERROR_TIMEOUT
3283 - Info: libusb_bulk_transfer Error Writing: -1
3283 - Info: LIBUSB_ERROR_IO
3283 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
3585 - Info: libusb_bulk_transfer Error reading: -7
3585 - Info: LIBUSB_ERROR_TIMEOUT
3585 - Info: libusb_bulk_transfer Error Writing: -1
3585 - Info: LIBUSB_ERROR_IO
3585 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
3586 - Info: libusb_bulk_transfer Error Writing: -1
3586 - Info: LIBUSB_ERROR_IO
3586 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
3889 - Info: libusb_bulk_transfer Error reading: -7
3889 - Info: LIBUSB_ERROR_TIMEOUT
3889 - Info: libusb_bulk_transfer Error Writing: -1
3889 - Info: LIBUSB_ERROR_IO
3889 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
3889 - Info: libusb_bulk_transfer Error Writing: -1
3889 - Info: LIBUSB_ERROR_IO
3889 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
3989 - Info: libusb_bulk_transfer Error Writing: -1
3989 - Info: LIBUSB_ERROR_IO
3989 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
4290 - Info: libusb_bulk_transfer Error reading: -7
4290 - Info: LIBUSB_ERROR_TIMEOUT
4291 - Info: libusb_bulk_transfer Error Writing: -1
4291 - Info: LIBUSB_ERROR_IO
4291 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
4593 - Info: libusb_bulk_transfer Error reading: -7
4593 - Info: LIBUSB_ERROR_TIMEOUT
4594 - Info: libusb_bulk_transfer Error Writing: -1
4594 - Info: LIBUSB_ERROR_IO
4594 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
4897 - Info: libusb_bulk_transfer Error reading: -7
4897 - Info: LIBUSB_ERROR_TIMEOUT
4897 - Info: CoreID: "0"
4897 - Info: libusb_bulk_transfer Error Writing: -1
4897 - Info: LIBUSB_ERROR_IO
4897 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
5198 - Info: libusb_bulk_transfer Error reading: -7
5198 - Info: LIBUSB_ERROR_TIMEOUT
5198 - Error: Did not find chipID!
5198 - Error: Device not found in database!
"
I have also STM32F401 and STM32L152.
Let me know, if it helps. Thanks.
woeimun
On Monday, June 16, 2014 10:56 PM, Fabien Poussin notifications@github.com wrote:
Can you provide the debug output ?
—
Reply to this email directly or view it on GitHub.
Use the -v parameter to get the debug output. (use -h for help)
It seems like it cannot connect to the board, you should try to reconnect it.
O.k. as per request:
"Verbose level: 5
71 - Debug: Loading device list.
71 - Info: Devices list loaded.
71 - Debug: "RDPTR_KEY" -> 165
71 - Debug: "KEY1" -> 1164378403
71 - Debug: "KEY2" -> 3455027627
71 - Debug: "OPTKEY1" -> 135866939
71 - Debug: "OPTKEY2" -> 1281191551
71 - Debug: "SR_BSY" -> 0
71 - Debug: "SR_PER" -> 2
71 - Debug: "SR_EOP" -> 5
71 - Debug: "CR_PG" -> 0
71 - Debug: "CR_PER" -> 1
71 - Debug: "CR_MER" -> 2
71 - Debug: "CR_STRT" -> 6
71 - Debug: "CR_LOCK" -> 7
71 - Debug: "CR_PGSIZE" -> 8
71 - Debug: "ACR_OFFSET" -> 0
71 - Debug: "KEYR_OFFSET" -> 4
71 - Debug: "OPT_KEYR_OFFSET" -> 8
71 - Debug: "SR_OFFSET" -> 12
71 - Debug: "CR_OFFSET" -> 16
71 - Debug: "AR_OFFSET" -> 20
71 - Debug: "OBR_OFFSET" -> 28
71 - Debug: "WRPR_OFFSET" -> 32
71 - Debug: "devices_default" -> "flash_base"
71 - Debug: "devices_default" -> "sram_base"
71 - Debug: "devices_default" -> "sram_size"
71 - Debug: "devices_default" -> "flash_size"
71 - Debug: "devices_default" -> "flash_pgsize"
71 - Debug: "device" -> "STM32L1xx (Low/Med Density)" -> "core_id"
71 - Debug: "device" -> "STM32L1xx (Low/Med Density)" -> "chip_id"
71 - Debug: "device" -> "STM32L1xx (Low/Med Density)" -> "flash_size_reg"
71 - Debug: "device" -> "STM32L1xx (Low/Med Density)" -> "flash_int_reg"
71 - Debug: "device" -> "STM32L1xx (Low/Med Density)" -> "sram_size"
71 - Debug: "device" -> "STM32L1xx (Low/Med Density)" -> "loader"
71 - Debug: "device" -> "STM32L1xx (High Density)" -> "core_id"
71 - Debug: "device" -> "STM32L1xx (High Density)" -> "chip_id"
71 - Debug: "device" -> "STM32L1xx (High Density)" -> "flash_size_reg"
71 - Debug: "device" -> "STM32L1xx (High Density)" -> "flash_int_reg"
71 - Debug: "device" -> "STM32L1xx (High Density)" -> "sram_size"
71 - Debug: "device" -> "STM32L1xx (High Density)" -> "loader"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "core_id"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "chip_id"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "flash_size_reg"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "flash_int_reg"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "sram_size"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "loader"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "core_id"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "chip_id"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "flash_size_reg"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "flash_int_reg"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "sram_size"
71 - Debug: "device" -> "STM32L1xx (Dual Flash Banks)" -> "loader"
71 - Debug: "device" -> "STM32F05x" -> "core_id"
71 - Debug: "device" -> "STM32F05x" -> "chip_id"
71 - Debug: "device" -> "STM32F05x" -> "flash_size_reg"
71 - Debug: "device" -> "STM32F05x" -> "flash_int_reg"
71 - Debug: "device" -> "STM32F05x" -> "sram_size"
71 - Debug: "device" -> "STM32F05x" -> "loader"
71 - Debug: "device" -> "STM32F100" -> "core_id"
71 - Debug: "device" -> "STM32F100" -> "chip_id"
72 - Debug: "device" -> "STM32F100" -> "flash_size_reg"
72 - Debug: "device" -> "STM32F100" -> "flash_int_reg"
72 - Debug: "device" -> "STM32F100" -> "sram_size"
72 - Debug: "device" -> "STM32F100" -> "loader"
72 - Debug: "device" -> "STM32F103 (Low Density)" -> "core_id"
72 - Debug: "device" -> "STM32F103 (Low Density)" -> "chip_id"
72 - Debug: "device" -> "STM32F103 (Low Density)" -> "flash_size_reg"
72 - Debug: "device" -> "STM32F103 (Low Density)" -> "flash_int_reg"
72 - Debug: "device" -> "STM32F103 (Low Density)" -> "sram_size"
72 - Debug: "device" -> "STM32F103 (Low Density)" -> "loader"
72 - Debug: "device" -> "STM32F103 (Medium Density)" -> "core_id"
72 - Debug: "device" -> "STM32F103 (Medium Density)" -> "chip_id"
72 - Debug: "device" -> "STM32F103 (Medium Density)" -> "flash_size_reg"
72 - Debug: "device" -> "STM32F103 (Medium Density)" -> "flash_int_reg"
72 - Debug: "device" -> "STM32F103 (Medium Density)" -> "sram_size"
72 - Debug: "device" -> "STM32F103 (Medium Density)" -> "loader"
72 - Debug: "device" -> "STM32F103 (High Density)" -> "core_id"
72 - Debug: "device" -> "STM32F103 (High Density)" -> "chip_id"
72 - Debug: "device" -> "STM32F103 (High Density)" -> "flash_size_reg"
72 - Debug: "device" -> "STM32F103 (High Density)" -> "flash_int_reg"
72 - Debug: "device" -> "STM32F103 (High Density)" -> "sram_size"
72 - Debug: "device" -> "STM32F103 (High Density)" -> "loader"
72 - Debug: "device" -> "STM32F105 (Connectivity)" -> "core_id"
72 - Debug: "device" -> "STM32F105 (Connectivity)" -> "chip_id"
72 - Debug: "device" -> "STM32F105 (Connectivity)" -> "flash_size_reg"
72 - Debug: "device" -> "STM32F105 (Connectivity)" -> "flash_int_reg"
72 - Debug: "device" -> "STM32F105 (Connectivity)" -> "sram_size"
72 - Debug: "device" -> "STM32F105 (Connectivity)" -> "loader"
72 - Debug: "device" -> "STM32F2**" -> "core_id"
72 - Debug: "device" -> "STM32F2**" -> "chip_id"
72 - Debug: "device" -> "STM32F2**" -> "flash_size_reg"
72 - Debug: "device" -> "STM32F2**" -> "flash_int_reg"
72 - Debug: "device" -> "STM32F2**" -> "sram_size"
72 - Debug: "device" -> "STM32F2**" -> "loader"
72 - Debug: "device" -> "STM32F30_" -> "core_id"
72 - Debug: "device" -> "STM32F30_" -> "chip_id"
72 - Debug: "device" -> "STM32F30_" -> "flash_size_reg"
72 - Debug: "device" -> "STM32F30_" -> "flash_int_reg"
72 - Debug: "device" -> "STM32F30_" -> "sram_size"
72 - Debug: "device" -> "STM32F30_" -> "loader"
72 - Debug: "device" -> "STM32F37_" -> "core_id"
72 - Debug: "device" -> "STM32F37_" -> "chip_id"
72 - Debug: "device" -> "STM32F37_" -> "flash_size_reg"
72 - Debug: "device" -> "STM32F37_" -> "flash_int_reg"
72 - Debug: "device" -> "STM32F37_" -> "sram_size"
72 - Debug: "device" -> "STM32F37_" -> "loader"
72 - Debug: "device" -> "STM32F4[01]" -> "core_id"
72 - Debug: "device" -> "STM32F4[01]" -> "chip_id"
72 - Debug: "device" -> "STM32F4[01]" -> "flash_size_reg"
72 - Debug: "device" -> "STM32F4[01]" -> "flash_int_reg"
72 - Debug: "device" -> "STM32F4[01]" -> "loader"
72 - Debug: "device" -> "STM32F4[01]" -> "SR_BSY"
72 - Debug: "device" -> "STM32F4[01]" -> "CR_STRT"
72 - Debug: "device" -> "STM32F4[01]" -> "CR_LOCK"
72 - Debug: "device" -> "STM32F4[01]" -> "CR_SER"
72 - Debug: "device" -> "STM32F4[01]" -> "SR_PER"
72 - Debug: "device" -> "STM32F4[01]" -> "CR_PGSIZE"
72 - Debug: "device" -> "STM32F4[01]" -> "sram_size"
72 - Debug: "device" -> "STM32F4[23]" -> "core_id"
72 - Debug: "device" -> "STM32F4[23]" -> "chip_id"
72 - Debug: "device" -> "STM32F4[23]" -> "flash_size_reg"
72 - Debug: "device" -> "STM32F4[23]" -> "flash_int_reg"
72 - Debug: "device" -> "STM32F4[23]" -> "loader"
72 - Debug: "device" -> "STM32F4[23]" -> "SR_BSY"
72 - Debug: "device" -> "STM32F4[23]" -> "CR_STRT"
72 - Debug: "device" -> "STM32F4[23]" -> "CR_LOCK"
72 - Debug: "device" -> "STM32F4[23]" -> "CR_SER"
72 - Debug: "device" -> "STM32F4[23]" -> "CR_PGSIZE"
72 - Debug: "device" -> "STM32F4[23]" -> "sram_size"
72 - Debug: New Transfer Thread
7773 - Debug: *__[ bool MainWindow::Connect() ]**
7774 - Info: Cannot open device
8077 - Info: libusb_bulk_transfer Error reading: -7
8077 - Info: LIBUSB_ERROR_TIMEOUT
8077 - Debug: _[ stlinkv2::STVersion stlinkv2::getVersion() ]_
8077 - Info: libusb_bulk_transfer Error Writing: -1
8077 - Info: LIBUSB_ERROR_IO
8077 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
8379 - Info: libusb_bulk_transfer Error reading: -7
8380 - Info: LIBUSB_ERROR_TIMEOUT
8380 - Debug: _[ void stlinkv2::setExitModeDFU() ]_
8380 - Info: libusb_bulk_transfer Error Writing: -1
8380 - Info: LIBUSB_ERROR_IO
8380 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
8380 - Debug: _[ void stlinkv2::setModeSWD() ]_
8380 - Debug: _[ quint8 stlinkv2::getMode() ]_
8380 - Info: libusb_bulk_transfer Error Writing: -1
8380 - Info: LIBUSB_ERROR_IO
8380 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
8682 - Info: libusb_bulk_transfer Error reading: -7
8682 - Info: LIBUSB_ERROR_TIMEOUT
8682 - Debug: _[ void stlinkv2::setExitModeDFU() ]_
8682 - Info: libusb_bulk_transfer Error Writing: -1
8682 - Info: LIBUSB_ERROR_IO
8682 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
8682 - Info: libusb_bulk_transfer Error Writing: -1
8682 - Info: LIBUSB_ERROR_IO
8682 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
8783 - Debug: _[ quint8 stlinkv2::getMode() ]_
8783 - Info: libusb_bulk_transfer Error Writing: -1
8783 - Info: LIBUSB_ERROR_IO
8783 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
9085 - Info: libusb_bulk_transfer Error reading: -7
9085 - Info: LIBUSB_ERROR_TIMEOUT
9085 - Debug: _[ quint8 stlinkv2::getStatus() ]_
9085 - Info: libusb_bulk_transfer Error Writing: -1
9085 - Info: LIBUSB_ERROR_IO
9085 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
9387 - Info: libusb_bulk_transfer Error reading: -7
9387 - Info: LIBUSB_ERROR_TIMEOUT
9388 - Debug: _[ quint32 stlinkv2::getCoreID() ]_
9388 - Info: libusb_bulk_transfer Error Writing: -1
9388 - Info: LIBUSB_ERROR_IO
9388 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
9690 - Info: libusb_bulk_transfer Error reading: -7
9690 - Info: LIBUSB_ERROR_TIMEOUT
9690 - Info: CoreID: "0"
9690 - Debug: _[ void stlinkv2::resetMCU() ]_
9690 - Info: libusb_bulk_transfer Error Writing: -1
9690 - Info: LIBUSB_ERROR_IO
9690 - Error: In qint32 stlinkv2::SendCommand(), at src/stlinkv2.cpp:596
9993 - Info: libusb_bulk_transfer Error reading: -7
9993 - Info: LIBUSB_ERROR_TIMEOUT
9993 - Debug: _[ quint32 stlinkv2::getChipID() ]_
9993 - Debug: Looking for: "0"
9993 - Error: Did not find chipID!
9994 - Error: Device not found in database!
"
woeimun
Sorry, I forgot to add this is output from the QStink2 GUI box:
"
15 Device descriptions loaded.
Searching Device...
ST Link V2 / Nucleo found!
Fetching version...
Changing mode to SWD...
Fetching mode...
Mode: DFU
Fetching status...
Status: Unknown
Fetching MCU Info...
Device not found in database!
"
From another command line my "lsusb" output: Bus 003 Device 015: ID 0483:374b SGS Thomson Microelectronics
woeimun
Can you retry with the latest code ? Nucleo uses different endpoints, I have made an update.
You need to update QtUsb as well.
Thanks.
Hi fpoussin,
Thanks. I have manage to get it to respond from my Nucleo STM32F103 now. Good job. Much appreciated for your effort. Will test with the rest of the series when I get back home.