Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Openocd STLink reset not working

Hi, I am trying to debug my STM32F765VGT6 micro controller.

Therefore, I connected the SWDIO, SWCLK, GND and VCC to a STLink V2 adapter.

Now, I can use “st-flash” to flash programs to the STM32, but OpenOCD does not work:

Open On-Chip Debugger
> reset halt
timed out while waiting for target halted
TARGET: stm32f7x.cpu - Not halted
in procedure 'reset'
in procedure 'ocd_bouncer'

How do I have to change my openocd.cfg to allow resetting the controller?

Note that NRST is currently hard-wired to VCC.
Nevertheless, “st-flash reset” successfully restarts the MC, so resetting has to work somehow...

Hello,

If you didn’t connect the Reset line, you will need to use the correct reset settings, like this one:
reset_config none separate

The st-flash reset is maybe a “software system reset” so it is not using the reset line of stlink.

Rgds,
Laurent


Hi,

thank you @LaurentL for your answer.

How should the electrical circuit look like, if I wanna use a reset-button and a pin, to connect the micro controller reset with the StLink adapter?

Thanks for your help :-D

kind of regards
Rabbe

In most of cases, the CPU /reset pin/signal work as OC-ored logic, so the pull down will effectively reset the CPU core; It usually be pulled up through a resister to VCC; DO NOT directly connect it to VCC.

There is an output/high impedance (/RST) signal/pin on STLink V2, should be connected to Micro-controller’s chip /Reset. So it will be able to reset the the micro-controller the STLink V2. Through Jtag/SWD command, it can soft reset the micro-controller, if the debug unit is reachable and you configure the OpenOCD script properly.


Hello Rabbe,

The STM32 mcu has an internal pull-up on reset pin, so you just need to connect pin 15 of STLink (on the 20 pin connector) to the Reset input of mcu. Nothing else.

And remove your hard wired reset connection to VCC.

Rgds,
Laurent


Thank you guys for your help :-D

 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  2. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs