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.