Skip to main content
Associate
August 17, 2023
Question

UPGRADE FIRMWARE stm32l072kztx

  • August 17, 2023
  • 2 replies
  • 5014 views

Olá pessoal,
estou tentando atualizar o micro firmware usando stm32 cubeIde stm32l072kztx. Já tentei usar os comandos AT^SISS e baixar o arquivo .HEX compilado via FTP, já tentei usar os comandos AT^SNFOTA, mas não funcionou. Baixando via FTP consigo baixar e colocar em modo de atualização de firmware e rodar sem retornar nenhum erro, mas ao testar vi que o firmware não foi atualizado. Ao usar o FOTA com o comando AT?SFDL=2 para executar a atualização do firmware, ele sempre retorna FOTA START --> FOTA FAIL --> FAIL!. O que devo fazer para atualizar o firmware do mcu e fazer com que o código-fonte que está sendo executado seja alterado pelo que está no novo firmware que é o novo firmware baixado do servidor?

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
August 17, 2023

"Hi everyone, I'm trying to update the micro firmware using stm32 cubeIde stm32l072kztx. I've tried using the AT^SISS commands and downloading the compiled .HEX file via FTP, I've tried using the AT^SNFOTA commands, but it didn't work. Downloading via FTP I can download and put it in firmware update mode and run without returning any errors, but when testing I saw that the firmware was not updated. When using FOTA with the AT?SFDL=2 command to perform the firmware update, it always returns FOTA START --> FOTA FAIL --> FAIL!. What should I do to update the mcu firmware and cause the source code that is running to be changed by what is in the new firmware which is the new firmware downloaded from the server?"

What firmware are we talking about that's supporting AT commands, and how's the data getting transferred? Review the firmware source, understand the expectations.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Associate
August 31, 2023

sorry for the confusion. Im trying to upgrade firmware, the ideia is that i run the computer with an initial code and after a certain routine it downloads a .HEX file via http (I use telit exs82-w module together), and then stores the data of this new firmware, and after that it somehow stops running the old firmware and starts to run the new one that was downloaded. All this with the code running, I'm currently trying to acomplishing this using dual-bank, where I store my downloaded firmware in the BANK2 of the flash, and after that I can't stop running the old one and start running the new one.

IDE stm32 cubeIde
Micro stm32l072kzt6x
Módule exs82-w telit
My micro stm32l072 has the following verses v1.12.1 - v1.12.2 - v1.12.0

Tesla DeLorean
Guru
August 31, 2023

Ok, so you're trying to update the firmware in the STM32 or EXS82?

If you download a .HEX from the HTTP server into the STM32, for the STM32, you're going to have to unpack that into a binary form, and then load it into the STM32 at the appropriate address (the one the linker built it for)

You could stage it in the second bank, and then use that to update the image in the first bank (or portion thereof), but there are quite a lot of moving parts.

If the image is in the second bank, and you need to run that from the first, you might want to use a reset to fork execution, and swap the banks. Do you have a way to determine which image is newer, and which bank is currently mapped?

https://www.telit.com/devices/exs82/

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Lina_DABASINSKAITE
Community Manager
August 18, 2023

Hello dear @yurymiguel , 

Thanks for your message. The forum language is English, so please expect the answers to be provide the respective language. 

@Tesla DeLorean , thanks for translating! 

BR,
Lina

​In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Tesla DeLorean
Guru
August 18, 2023

I just pressed a button in Chrome/Google, as I've previously observed, I'd much rather someone asks/answers richly in their native language, than poorly in English.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..