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?
"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.
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
Módule exs82-w telit
My micro stm32l072 has the following verses v1.12.1 - v1.12.2 - v1.12.0
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?
I need to update the stm32 firmware, the default and original firmware seems to start at bank1, using hal flash page function I pass the initial adress of bank2 and follow it through the memory monitor(I use CubeIDe) and I see that the data in .HEX is being stored, but I cant-jump to bank2 and bank1 stops executing, I've already tried changing the vector initialization with code running call the function, I've tried configuring opbit for bank2 after downloading and resetting the computer, I've already tried to map the code execution for bank2 in many ways after the donlowad is completed, my code has the entire conversion structure for .HEX, not for binary. My computer has the following firmware versions v1.12.1 - v1.12.2 - v1.12.0, I hope that these versions that came with me computer are capable of marking the bootloader, What form, or function of the Hall lib, or anything else should I use to skip execution the pro bank2 code? Should i call some other pin configuration?
The currentStatus of this case returns Sucess-Close-Service wich indicates that the .HEX firmware was sucessfully downloaded and is saved in memory bank2, Then I tried to do all this jump to bank2, this case is inside a while loop.
Currently this function is called to perform the jump. We configure it to jumpt to bank2.
advOBConfig.OptionType = OPTIONBYTE_BOOTCONFIG;
advOBConfig.BootConfig = OB_BOOT_BANK2;
if (HAL_FLASHEx_AdvOBProgram(&advOBConfig) != HAL_OK)