---
** [tickets:#243] cann't flash into Nucleo-L053R8 board**
**Status:** new
**Milestone:** 0.9.0
**Created:** Sat Jul 06, 2019 04:36 PM UTC by Yutao
**Last Updated:** Sat Jul 06, 2019 04:36 PM UTC
**Owner:** nobody
My board is
[Nucleo-L053R8](https://www.st.com/zh/evaluation-tools/nucleo-l053r8.html) with
STM32L053R8 MCU. I'm using CLion 2019.1 and configured OpenOCD with this cfg:
~~~
# This is a NUCLEO-64 board with a single STM32L053RB chip.
#
source [find interface/stlink.cfg]
transport select hla_swd
# chip name
set CHIPNAME STM32L053
source [find target/stm32l0.cfg]
reset_config srst_only connect_assert_srst
~~~
And I generated code files from STM32CubeMX, and it built successfully. When I
download it, the error appears:
~~~
openocd.exe -c "tcl_port disabled" -s
C:\BuildTools\Arm\OpenOCD\share\openocd\scripts -c "gdb_port 3333" -c
"telnet_port 4444" -f board/my-stm32l053.cfg -c "program
\".../untitled/cmake-build-debug/untitled.elf\"" -c reset -c shutdown
Open On-Chip Debugger 0.10.0 (2019-06-25) [https://github.com/sysprogs/openocd]
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 mi
ght differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : clock speed 240 kHz
Info : STLINK V2J33M25 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.259513
Info : STM32L053.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : Unable to match requested speed 300 kHz, using 240 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x080014b0 msp: 0x20002000
STM32L0: Enabling HSI16
Info : Unable to match requested speed 2500 kHz, using 1800 kHz
Info : Unable to match requested speed 2500 kHz, using 1800 kHz
** Programming Started **
Info : Device: STM32L0xx (Cat. 3)
Info : STM32L flash size is 64kb, 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
embedded:startup.tcl:439: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 498
at file "embedded:startup.tcl", line 439
~~~
I don't know what happened, but I find that my board's embeded STLink/V2-1 only
supports SWD.
What can I do to flash program properly?
---
Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/openocd/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/openocd/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel