Getting "Error:initmode failed (unable to connect to the target)

Sysprogs forums Forums VisualGDB Getting "Error:initmode failed (unable to connect to the target)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32279
    GeneM
    Participant

    Everything has been working fine for quite a while.  I started learning how to use the LPTIMER on the STM32 Nucleo-H7A3ZI-q that I’ve been using for a long time.  I got the STM example  working and powered down.  Now, when I try to run my example program, or any other program, I get a “init mode failed (unable to connect to the target)” error.  When I click on “view gdb stub log” I get this:

    VisualGDB: restarting tool…
    Open On-Chip Debugger 0.11.0 (2021-06-25) [https://github.com/sysprogs/openocd]
    Licensed under GNU GPL v2
    libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select <transport>’.
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
    Info : clock speed 1800 kHz
    Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
    Info : STLINK V3J9M3 (API v3) VID:PID 0483:374E
    Info : Target voltage: 3.293023
    Error: init mode failed (unable to connect to the target)

    I get the same error for other programs I’ve written that have been working for a long time. The LPTIMER program I was working on periodically  puts the MCU in a low power state and then wakes it up in case that is part of the problem.

    I get the same error if I try to build a new project.  While setting up the debugger for the new project I can hit the test open OCD button and get this similar error.

    C:\Users\gene\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.openocd\bin\openocd.exe -c “gdb_port 52743” -c “telnet_port 52741” -f interface/stlink.cfg -f target/stm32h7x_dual_bank.cfg -c init -c “reset init” -c “echo VisualGDB_OpenOCD_Ready”
    Open On-Chip Debugger 0.11.0 (2021-06-25) [https://github.com/sysprogs/openocd]
    Licensed under GNU GPL v2
    libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select <transport>’.
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
    Info : clock speed 1800 kHz
    Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
    Info : STLINK V3J9M3 (API v3) VID:PID 0483:374E
    Info : Target voltage: 3.293023
    Error: init mode failed (unable to connect to the target)

    Luckily I have another Nucleo-H7A3ZI-Q board and it does not exhibit this error.

    Any suggestions will be greatly appreciated.  Thanks

     

    #32281
    support
    Keymaster

    Sorry, this looks like an issue with your board, and not something specific to VisualGDB.

    #32283
    GeneM
    Participant

    I was afraid of that too.  But I had what turned out to be a good idea.  I used STM32CubeIDE to run the same STM LPTIMER example on the “failed” Nucelo board and it worked.  I tried my original LPTIMER example using VisualGDB and it works too.  So does the main project I’ve been working on. It may be related to me powering down the Nucleo board while the program was in the low power state and VGDB not being able to wake it up but that is way beyond my skill set.  Thanks for the quick response.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.