32V307 用LINK烧录失败

图片.png

是不是FLASH被锁了啊?能不能不用USB解锁.板子没有USB口

您好,麻烦你截一张完整的指令和信息输出图,这边看一下,可将截图发至我的邮箱(lzs@wch.cn)。或者你尝试将BOOT0接VCC重新上电下载看一下,看能否下载烧录。


Open On-Chip Debugger 0.11.0+dev-02215-gcc0ecfb6d-dirty (2022-03-10-09:55)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Ready for Remote Connections
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : WCH-Link version 2.3
Info : wlink_init ok
Info : This adapter doesn't support configurable speed
Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (), part: 0x0000, ver: 0x0)
Warn : Bypassing JTAG setup events due to errors
Info : [riscv.cpu.0] datacount=2 progbufsize=8
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x40901125
[riscv.cpu.0] Target successfully examined.
Info : starting gdb server for riscv.cpu.0 on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x263e7847
Info : flash size = 256kbytes
Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333"
Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (), part: 0x0000, ver: 0x0)
Warn : Bypassing JTAG setup events due to errors
Error: error writing to flash at address 0x00000000 at offset 0x00000000
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (7754 ms). Workaround: increase "set remotetimeout" in GDB
Error: failed read at 0x11, status=10614148
Assertion failed: info, file src/target/riscv/riscv-013.c, line 252


图片.png


这是我用OpenOCD+Telnet操作的情况:

program指令运行时直接奔溃了


Open On-Chip Debugger
> reset init
JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (), part: 0x0000, ver: 0x0)
Bypassing JTAG setup events due to errors
> flash erase_address 0x00000000 0x40000
device id = 0x263e7847
flash size = 256kbytes
erased address 0x00000000 (length 262144) in 0.212762s (1203.222 KiB/s)

> program C:/MRS_DATA/workspace/xx.bin 0x00000000
JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (), part: 0x0000, ver: 0x0)
Bypassing JTAG setup events due to errors
** Programming Started **
error writing to flash at address 0x00000000 at offset 0x00000000
embedded:startup.tcl:1136: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 1201
at file "embedded:startup.tcl", line 1136
failed read at 0x11, status=0


使用flash write_image指令一样的结果


> reset init
JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (), part: 0x0000, ver: 0x0)
Bypassing JTAG setup events due to errors
> flash erase_address 0x00000000 0x40000
device id = 0x263e7847
flash size = 256kbytes
erased address 0x00000000 (length 262144) in 0.208332s (1228.808 KiB/s)

> flash write_image xxx.bin 0x00000000 bin
error writing to flash at address 0x00000000 at offset 0x00000000

failed read at 0x11, status=0


图片.png在MRS里面用菜单里的烧录


您好,建议你先用WCHISPTool工具通过串口方式解除读保护,重新下载程序试一下,注意不要勾选启用读保护。使用串口方式下载时:BOOT0接VCC,BOOT1接GND,使用的串口工具要注意防倒灌电。串口接串口1(PA9、PA10引脚)。后面若有问题,可将问题发我邮箱(lzs@wch.cn).

WCHISPTool工具下载链接:http://www.wch.cn/downloads/WCHISPTool_Setup_exe.html 

image.png


只有登录才能回复,可以选择微信账号登录