2023-12-07 5:18 AM
hi,
Previously i was using STM32L010K8TX which has 8K memory. I did OTA update in this device via Uart with help of external controller which receive hex file from User.
Currently am using STM32L010R8Tx which has 64K memory. And i tried the same OTA program to update the application in this new device but after OTA update the user application is running proper.
The external device which receive hex file has a debug communication port to monitor STM32L0 device by communicating in UART. After updating the application the UART communication not at all responding to external device.
After completing the OTA update am using GO command to run application (0x08000000) and making Boot Pin Low ( which is making HIGH When Entering to OTA mode). Am using same OTA file commands flow to update which was used for previous device (stm32L010K8Tx) including the memory locations.
but in new device after updating the OTA it stops working Uart peripheral. I am not sure about other peripherals are working or Not. because i did not tested other peripherals state. UART is the only communication i can check now with help of another device. if uart is working i can get the other peripherals state through uart messages.
is there any memory address change between these two device ?
if not why the new device is not responding in uart?
If we do NRST reset it starts communicating in Uart.
kindly help in this topic ..
thanks,
Nikhil
Solved! Go to Solution.
2023-12-20 9:18 PM
Hi,
The issue is resolved now.
It is because of re initialization of global variables which is used in uart receive routine.
i was comparing receive buffer pointer of HAL library with user defined buffer pointer to check any data is received or not.
after FOTA the userdefined variable initial value is assigned with some random value.
After reinitialize the value the uart receive routine works fine. Previously i was initializing the value globaly during declaration.
now it is initializing in main() again.
Thanks,
2023-12-07 6:47 AM
Double check status return from UART, perhaps explicitly reset the UART, check for noise, framing, parity type errors.
The system loader doesn't reset the part, so whatever pins, clocks and uart settings might be inherited.
Don't recall if the watchdog is running, or not
2023-12-07 10:12 PM
Hi,
Watchdog is not yet enabled.
In application Uart is running on 9600bps with No Parity.
When FOTA is updating application other device changing the parity to EVEN because FOTA works in Even Parity.
After writing all pages other Device executing GO command with address of 0x08000000 then Making Low BOOT0 pin of STM32 and also changing the parity to NONE.
Same FOTA application code works in STM32L010k8 device. currently we updated the device to STM32L010R8 to increase the memory and add other peripheral like GPS which is connected to LPUART.
Normally the application communicate with other device in a minute but after OTA waited for long time still the STM32 not sending any uart message to other device.
After NRST reset the stm32 the device start communicating with updated application code. i Hope Passing 0x08000000 itself a kind of reset for application. by setting memory to 0x8000000 i think peripheral doesnot reset. But in application am re-initializing (MXinit()) all peripheral.(code generated by MXcube).
Is there any Boot command to Reset the STM32 from externally.
Noise and parity i checked and everything is fine.
2023-12-10 10:08 PM
Hi,
I created FOTA commands by referring AN3155 rev16 document.
Start Memory Address : 0x08000000
2023-12-14 9:31 PM
hi,
I have checked huart2 errors and there was no error.
I tried to print some strings in uart terminal and it is working fine. Getting print on terminal when running.
i think uart receive occurring a problem while receive through interrupt.
Does it need to enable to get jump to uarterror_callback() if uart getting any error?
2023-12-20 9:18 PM
Hi,
The issue is resolved now.
It is because of re initialization of global variables which is used in uart receive routine.
i was comparing receive buffer pointer of HAL library with user defined buffer pointer to check any data is received or not.
after FOTA the userdefined variable initial value is assigned with some random value.
After reinitialize the value the uart receive routine works fine. Previously i was initializing the value globaly during declaration.
now it is initializing in main() again.
Thanks,
2025-04-18 12:33 AM
WILL YOU PLEASE SHARE THE SOURCE CODE FOR UPLOAD FIRMWARE VIA UART , AND PLEASE SHARE HOW TO USE THE SYSTEM BOOTLOADER HOW TO ACTIVATE THAT TO RECEVE FIRMWARE ,
I AM DOING AN OTA WITH THE STM32U575 AND THE ESP32 CAN YOU GUIDE ME
2025-04-20 9:55 AM
Hi @premkumar ,
We have used LTE module to push hex file to STM32 via UART.
We referred following document.
AN3155 rev16
Here follows the steps.
> STM32 receive notification for Update.
> STM32 Backup all necessary readings such as analog , RTC etc.
> LTE module push low STM32's BOOT pin.
> Reboot using NVIC reboot.
> Rest of the action handled by STM Bootloader with LTE Modem.
> LTE module select the hex file and push to STM32 by addressing Memory location of stm32 to where the hex file has to be written.
Thanks,
Nikhil
2025-04-21 2:18 AM
Hi @nikhivv07
Thanks for your reply, I am trying to upload the firmware from the esp32 to stm32f1.
1. I Entered the Bootloader
2. Sent the 0x7F to initialize uart Bootloader.
Result:- I receved this , I NACK from the stm32f103c6t6
will you please assist what to do
2025-04-22 12:50 AM
hi @premkumar ,
Check the Parity of UART settings. Bootloader works in Even Parity.
After initializing bootloader change your UART parity to EVEN.
_nikhil