LoRaWAN FUOTA example migrate to STM32WLE5
Hi
I'm trying to migrate and run LoRaWAN FUOTA example on STM32WLE5 custom hardware. I tried to use solution from: https://community.st.com/t5/stm32-mcus-wireless/how-to-migrate-from-stm32wl55-to-stm32wle5/m-p/190815
but replacing STM32WL55JCIX_FLASH.ld file was too complex, because it contains a lot of flash setions related with KMS. I'm not sure if this is needed, because WL55 differs from WLE5 only by extra CM0 core.
Code starts with no issues, connecting to AWS IoT Core, joining multicast group. Problem happened when FUOTA starts and first packet is receiver. Device gets into hard fault, there is "unaligned memory error", when 48-bytes of firmware is coppied to flash memory using LDRD command. It happens because source address is 0x200071EF which is not 8-byte aligned. I fixed that with very simple coppying to another buffer. Now full firmware can be written to flash memory, but update process is still unsuccesfull, there are many flash_write errors and device reboots with an old firmware. I'm still trying to debug what's happening at the end, but maybe someone has tried to run FUOTA on stat uC and have some solution?
unaligned memory fixFlash write error
LDRD unaligned memory
