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


Unable to set adapter speed [Solved]

Hello guys,
I have a custom board with stm32f107vct7 processor. I’m trying to debug simple code with ST-Link-V2 bought on Aliexpress under Ubuntu 16.04. Then i’m trying to run project sw4stm32 throws next exception:

Open On-Chip Debugger 0.10.0-dev-00278-ga53935e-dirty (2017-05-09-09:16)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 4000 kHz
adapter_nsrst_delay: 100
Info : clock speed 4000 kHz
Info : STLINK v2 JTAG v21 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : vid/pid are not identical: 0x0483/0x374B 0x0483/0x3748
Info : using stlink api v2
Info : Target voltage: 3.193113
Error: Unable to set adapter speed
Info : STM32F107VCTx.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: timed out while waiting for target halted
TARGET: STM32F107VCTx.cpu - Not halted
in procedure ‘program’
in procedure ‘reset’ called at file “embedded:startup.tcl”, line 478
in procedure ‘ocd_bouncer’

    • Unable to reset target **

shutdown command invoked


Seems like, openOCD sets higher adapter speed then it’s possible. Board worked fine under Windows7 on keil ide with st-link frequency 1MHz.
How do I go about requesting it connect at a lower speed?

Best regards,
Alex

Hi,
On these STLink, i suppose there is no reset line or you didn’t connect it.

Without reset, you can change the reset config in debug launch config to “software system reset” and it can work.
But if you use low power modes or SWD pins as GPIO, without reset connected to the stlink, you won’t be able to connect to the target.

Rgds,
Laurent

Hi Laurent,
You’re right, i’m trying to flash without reset line.

Finally, i have beaten my problem. That error occured due to bad st-link configuration.
I clicked “User Defined” configuration script in run config and manually changed it following way:

set CLOCK_FREQ 1800
reset_config none


I know it’s trick to manually change config file, but It’s works fine.
Thanks.

Best regards,
Alex

You could have done the same choosing “Software system reset” in reset mode combo.
This generates the “reset_config none” config.

I have checked it. It works great.
Thanks.


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  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. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs