reTerminal - not working after STM32 firmware update

Hello friends,

I have bought new reTerminal and performed STM23 FW upgrade according to the tutorial described on web (the flash with OpenOCD, actual version of the firmware 1.8). After the reboot I am not able to bring the display and peripherals to live. Is there some other method or the way how to bring the functionality back? I am lost…
Thank you for your help,

Martin

Hi,
I had the same problem ([solved] reTerminal: Flashing STM32 firmware fails && Display no longer recognized)
Flashing with openOCD kept failing.
I’m unsure why but i think it transferred enough bytes to at least boot up and respond to i2c commands.

Try flashing a couple of times and make sure the leads of the programmer aren’t lose.
Repeat until the STM show’s up on the i2c bus with address 0x56 and then flash again with the procedure for board revision 1.7+

Edit:
This was for the worst case scenario. If you have rev. 1.8 of the board, did you swap the address of the STM32 chip? The instructions are for revisions lower than 1.7
You could simply use stm32flash or if you want to flash it with openOCD use address 0x56

Good luck

Thank you for the reply. I have already flashed with v1.8, the screen works, but only until the next reboot - I think there must be some conflict in the adresses in the FW. After the flashing there is 0x45 shown and the display works, after the reboot there is 0x56 and the display does not work… Did you find the solution how to fix this permanently?

The address should be 0x45 for normal operation.
It only show’s up with 0x56 if the STM32 is in bootloader mode.

If you can read the address with i2cdetect no driver blocks access to it. Have you enabled the DT Overlay again?

Are you sure you have board revision 1.8? This is not the same as the firmware version.
If you are unsure it’s also printed on the PCB

Dear Tom,
I have the board version 1.4. The DT Overlay in config.txt is enabled.
When I run i2cdetect, after the restart, there is 0x56.

I also just flashed version 1.8 of the firmware. Had no troubles with it.

  1. Disable the reTerminal DTO in /boot/config (comment out the the line dtoverlay=reTerminal)
  2. Reboot (important so the driver doesn’t get loaded)
  3. Check with i2cdetect -y 1 if the STM has address 0x45
  4. Kick the STM32 into the bootloader mode with “i2ctransfer -y 1 w2@0x45 0x9b 0x01”
  5. Check again with “i2cdetect -y 1”. it should now be listed with address 0x56
  6. Erase the flash with “./stm32flash -a 0x56 -o /dev/i2c-1”
  7. Flash the new firmware with “./stm32flash -a 0x56 -w STM32G030F6_R2.bin -v -g 0x0 /dev/i2c-1”
  8. Restore the /boot/config -> uncomment dtoverlay=reTerminal && reboot

Here’s a screenshot of the output:

Hope this is of some help

Sorry, haven’t seen you already responded.

If it’s already in the bootloader you can start at step 6.
If i2cdtect writes the address you don’t even need to uncomment the DTO.
This is only necessary if it’s listed as “UU”

Dear Tom, thank you, I appreciate your help very much.
I went through all the steps.
After the reboot, the display and peripherals works. But only until the next shut down / restart. Than, there is 0x56 address again and the display is not working.
So, I am able to keep the display working only after the fresh STM32 flash, till the next power off/power on. I really don’t know, what is bad, I adhered all the points on seed’s wiki and also in your guide.
I also reflashed the rpi image from seed again.
Should I perform repeated flash through openOCD? I performed it yesterday repeatedly, but with the same result.

I’m not exactly sure what exactly prompts this behavior.
Could be that the bootloader part of the firmware is broken.
Maybe stm32flash and flashing via openocd write different parts of the firmware.

Did you have any errors on your output?

I had a lot of them and also tired flashing with openocd multiple times (about ~20x) until the output was a bit longer than usual … that’s when the STM finally registered with address 0x56 again.

I will try to reflash v1.8 both openOCD. The last output seemed to me OK, with verification passed but if there are some doubts…
I have the second unit on the way, I will not perform any upgrade until this will be fixed.

That’s different from the flash i did with openocd. I had a lot of errors as you can see in the link on my first reply.
The only thing i can think of being the culprit here is a corrupt firmware.
There are 2 more things you can try:

  • verify checksum of the download
  • give v1.7 a try

Dear Tom, I tried every step repeatedly, tried to flash FW directly through OpenOCD and also through STM32 flash many times, tried to reinstall drivers, too - still the same behaviour: After the cold start the display is off and the i2cdetect output shows 0x56 again. I spent lots of time with this issue, I will wait for the response from the seed support. I hope, there will be solution.
Thank you, Tom.

Hello,

I have actually a problem with my seeed reterminal.

I tryied to upgrade the STM32 firmware to the 1.8version and now I have no screen nor hdmi at all…

I can connect to the reterminal through ssh so I tried to flash the firmware with both methods.

The first one doesn t work because I have this kind of error and I don t know how to solve it

pi@raspberrypi:~ $ i2ctransfer -y 1 w2@0x45 0x9b 0x01
Error: Sending messages failed: Remote I/O error
pi@raspberrypi:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- 19 -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- 56 -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

I tryied the second method with wires and the programm successed to flash the STM32 with the 1.8 and 1.7 version but nothing happen then

I tried to reboot it many times, reinstall Raspberry pi OS, reinstall drivers…

Drivers seem to work because I have access to the light sensor, the RTC and buttons with evtest.

I have also tryied to connect to the reterminal trough VNC but it doesn t work neither

I have no more idea, could anyone help me ?

Thank you very much

Thanks a lot for the thread. This information was helpful to me.

Hello,

I have finally fixed the black screen problem

I think the STM32 was stuck in boot mode so the command i2ctransfer shown an error

I just skipped this step (step 10 of method 1) and I managed to flash the STM32

I hope it will help someone

I have a slightly different problem. 45 never becomes 56

pi@homeassistant:~/STM32 $ i2ctransfer -y 1 w2@0x45 0x9b 0x01

pi@homeassistant:~/STM32 $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- 19 -- -- -- -- -- -- 
20: 20 -- -- -- -- -- -- -- -- 29 -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- 45 -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

So any effort to flash will fail:

pi@homeassistant:~/STM32 $ ./stm32flash -a 0x56 -o /dev/i2c-1
stm32flash 0.6
http://stm32flash.sourceforge.net/
Warning: Not a tty: /dev/i2c-1
Error probing interface "serial_posix"
Interface i2c: addr 0x56
Failed to send command

So I’m stuck at point 5 in TomToms checklist :frowning:
I did the #dtoverlay=reTerminal and rebooted,
Am I missing something obvious?