cancel
Showing results for 
Search instead for 
Did you mean: 

Problem to flash STM32L07 using openocd on ubuntu and Raspberry PI.

MJawo.2
Associate

Hi, 

I’m trying to flash STM32L07 using STLINK-V3MODS on Raspberry PI. My operating system is Ubuntu and I’m using openocd.

When I try to flash using command:

openocd -d -f /usr/share/openocd/scripts/board/stm32l0discovery.cfg -c "program /home/ubuntu/st-link-testing/file_name.bin reset 0x08000000"

I got an error:

Open On-Chip Debugger 0.11.0

Licensed under GNU GPL v2

For bug reports, read

Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

srst_only separate srst_nogate srst_open_drain connect_deassert_srst

Info : clock speed 200 kHz

Info : STLINK V3J8M3B5S1 (API v3) VID:PID 0483:374F

Info : Target voltage: 1.798408

Info : stm32l0.cpu: hardware has 4 breakpoints, 2 watchpoints

Info : starting gdb server for stm32l0.cpu on 3333

Info : Listening on port 3333 for gdb connections

Info : Unable to match requested speed 300 kHz, using 200 kHz

Info : Unable to match requested speed 300 kHz, using 200 kHz

target halted due to debug-request, current mode: Thread 

xPSR: 0xf1000000 pc: 0x08014fb4 msp: 0x20005000

STM32L0: Enabling HSI16

Info : Unable to match requested speed 2500 kHz, using 1000 kHz

Info : Unable to match requested speed 2500 kHz, using 1000 kHz

** Programming Started **

Info : Device: STM32L0xx (Cat.5)

Info : STM32L flash has dual banks. Bank (0) size is 96kb, base address is 0x8000000

Error: jtag status contains invalid mode value - communication failure

Info : Previous state query failed, trying to reconnect

Error: error writing to flash at address 0x08000000 at offset 0x00000000

** Programming Failed **

shutdown command invoked

Do you have any idea how to fix it? 

0 REPLIES 0