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


[solved] Incorrect idcode on new batch of STM32F030F4P6TR

Hi All,
I have a design that uses STM32F030F4P6TR. Everything was fine until I had to replace one of the MCU’s. The new batch of MCU’s report a different device id, and so SW4STM32 refuses to program them:

-------------------------------------
Open On-Chip Debugger 0.10.0-dev-00271-g090f597 (2016-07-11-10:42)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_assert_srst
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v23 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.197369
Warn : UNEXPECTED idcode: 0x2ba01477
Error: expected 1 of 1: 0x0bb11477
in procedure ‘init’
in procedure ‘ocd_bouncer’
-------------------------------------

Some googling got me to this page of the openocd source code: http://www.pittnerovi.com/jiri/hobby/electronics/stm32f4/stlink-common.hQuestion

Which says:

/* cortex core ids */
// TODO clean this up...

  1. define STM32VL_CORE_ID 0x1ba01477
  2. define STM32L_CORE_ID 0x2ba01477
  3. define STM32F3_CORE_ID 0x2ba01477
  4. define STM32F4_CORE_ID 0x2ba01477
  5. define STM32F0_CORE_ID 0xbb11477
  6. define CORE_M3_R1 0x1BA00477
  7. define CORE_M3_R2 0x4BA00477
  8. define CORE_M4_R0 0x2BA01477



It looks like my STM32F0 chips are reporting the STM32L core ID. Does any one know why? How can I force OpenOCD to go ahead and program them from SW4STM32?

Thanks.

EDIT: It turns out I was connected to the wrong SWD port. There are 2 stm32’s in my design redface

--Ok so after quite a few hours of research, this seems to have solved my problem:

Edit the .cfg file in the project folder and add the following line:
-------------------------------
#mp035: for the odd STM32F0 batch from Element 14
set CPUTAPID 0x2ba01477
-------------------------------

But this has to be removed to program devices with the normal idcode.--


 

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