2024-06-19 04:53 AM
Hello everyone, I have a stm32l072 microcontroller and an NB exs82 module connected via LPUART. And I'm trying to read a new .HEX firmware that is stored in the NB module's FFS and then make the microcontroller receive the packages that contain the reading of the new firmware and write them to the flash. New firmware has been built for BANK2 0x08018000.
My microcontroller asks the module to read the file with the command AT^SFSA=read, then the module starts reading and the microcontroller receives this data and must write it to flash, with continuous execution of the microcontroller. However, I am not able to write the data correctly to flash memory, it has the following behaviors.
When I delete all of bank2 and receive packet by packet (BUFFER WITH 512KB) and write all the data to bank2 it gets a little wrong, because when I run bank2 it just resets all the time.
When I receive the address, clearing this address and recording the microcontroller execution hangs.
How can I receive data packet by packet from the new firmware and write it correctly to the flash, without interrupting the microcontroller execution?