[solved] reTerminal: Flashing STM32 firmware fails && Display no longer recognized

Hello,
i tried to upgrade the STM32 firmware on my reTerminal as mentioned in the wiki.
The board revision is v1.3 and the firmware before flashing was 1.0
openOCD always fails with a timeout while writing but the connection seems to be OK
since it is able to get some infos over the SWD link.
After some hours of trying i put the Terminal back together to check if everything is still working and now the Display stays blank. (reTerminal DTO is enabled)

I already tried the following:

  • Try flashing with/without Display/TP/Light connected
  • different cables and connections (jumper wires, pogo-pins, test-leads, IC-Clips)
  • clean and reconnect Display/TP/Light
  • copy openOCD files/dirs for target, interface, cpu into working directory
  • relative and absolute path for firmware file

I’m pretty inexperienced regarding JTAG/SWD and clueless what else to do.
Can someone help me out here and give me some hints how to proceed?

Thanks

dmsg | grep i2c Output:

Summary

[ 3.406375] i2c /dev entries driver
[ 5.133796] brcmstb-i2c fef04500.i2c: @97500hz registered in polling mode
[ 5.167308] brcmstb-i2c fef09500.i2c: @97500hz registered in polling mode
[ 6.365253] lis331dlh_i2c: loading out-of-tree module taints kernel.
[ 6.367437] lis3lv02d_i2c 1-0019: supply Vdd not found, using dummy regulator
[ 6.367698] lis3lv02d_i2c 1-0019: supply Vdd_IO not found, using dummy regulator
[ 6.407651] lis331dlh_i2c: 8 bits 3DC sensor found
[ 6.579005] [DSI]i2c_md_init:
[ 6.579153] [DSI]i2c_md_probe:start
[ 6.579618] i2c_mipi_dsi 1-0045: I2C read id failed: -5

openOCD Output:

Summary

pi@raspberrypi:~/Downloads/openocd $ sleep 6 ; openocd -f interface/sysfsgpio-raspberrypi.cfg -c “transport select swd” -f target/stm32g0x.cfg -c “program ./STM32G030F6_R2.bin verify 0x08000000;shutdown”
Open On-Chip Debugger 0.11.0+dev-00380-gf24a283ac (2021-09-11-02:00)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
SysfsGPIO nums: swclk = 11, swdio = 25

swd
Info : SysfsGPIO JTAG/SWD bitbang driver
Info : This adapter doesn’t support configurable speed
Info : SWD DPIDR 0x0bc11477
Info : stm32g0x.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for stm32g0x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Error: Translation from khz to jtag_speed not implemented
Error executing event reset-start on target stm32g0x.cpu:
embedded:startup.tcl:788: Error:
in procedure ‘program’
in procedure ‘ocd_process_reset’
in procedure ‘ocd_process_reset_inner’ called at file “embedded:startup.tcl”, line 788
target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x080009cc msp: 0x20002000
Error: Translation from khz to jtag_speed not implemented
Error executing event reset-init on target stm32g0x.cpu:
embedded:startup.tcl:788: Error:
in procedure ‘program’
in procedure ‘ocd_process_reset’
in procedure ‘ocd_process_reset_inner’ called at file “embedded:startup.tcl”, line 788
** Programming Started **
Info : device idcode = 0x10016466 (STM32G03x/G04xx - Rev Z : 0x1001)
Info : RDP level 0 (0xAA)
Info : flash size = 32kbytes
Info : flash mode : single-bank
Warn : Adding extra erase range, 0x08004128 … 0x080047ff
Error: timeout waiting for algorithm, a target reset is recommended
Error: error executing stm32l4 flash write algorithm
Error: block write failed
Error: error writing to flash at address 0x08000000 at offset 0x00000000
embedded:startup.tcl:1070: Error: ** Programming Failed **
in procedure ‘program’
in procedure ‘program_error’ called at file “embedded:startup.tcl”, line 1135
at file “embedded:startup.tcl”, line 1070
pi@raspberrypi:~/Downloads/openocd $

Hello again,

i got my problem solved.
I hooked up a second Raspi and run openocd from there … multiple times.
The output was mostly the same with some more/less errors … but nothing indicated a successful write.
However on the reTerminal /dev/i2c-1 bus appeared a device with address 0x56
Next i tried the procedure for board revision 1.7 and voila´ … it was successful

After re-enabling the reTerminal DTBO and a reboot display and touch works again