cancel
Showing results for 
Search instead for 
Did you mean: 

Porting LoRaWAN_FUOTA application for STM32WLE5CCU6

devjeet-adben
Associate

MCU : STM32WLE5CCU6
Firmware Package Name and Version : STM32Cube FW_WL V1.4.0
Application : FUOTA using LoRaWAN
Setup : End Node(STM32WL) <===> Gateway(Dragino LPS8) <====> TTN


Hello, 
I am trying to get my LoRaWAN FUOTA example running for few days with unsuccessful attempts.

At first i was successfully able to build LoRaWAN FUOTA application provided by ST under STM32Cube_FW_WL_V1.4.0. This firmware is made for NUCLEO-WL55JC(STM32WL55JC, Dual core with 256KB flash)

But as i have STM32WLE5CCU6(Single core 256KB flash). With that also i tried to change the startup and linkers and updating .cproject with correct part number and was able to build it but while flashing gets an error.

\STM32Cube\Repository\STM32Cube_FW_WL_V1.4.0\Projects\NUCLEO-WL55JC\Applications\LoRaWAN_FUOTA\Scripts\STM32CubeIDE> .\program.bat

 

###########################################
# 0- Set all global variables
###########################################
###########################################
# 1- Disable security
###########################################
###########################################
# 1- Disable security
###########################################
RDP: Read Out protection Level 1
RDP+ESE: Read Out protection Level 0 + Security disabled
WRP: Write Protection disabled
------ User Configuration ------
nRST: No reset generated when entering the Stop/Standby/Shutdown modes
WDG_SW: Software window/independent watchdogs
IWDG: Independent watchdog counter frozen in Stop/Standby modes
BOOT: CPU1+CPU2 CM0+ Boot lock disabled
------ Security Configuration ------
HDPAD: User Flash hide protection area access disabled
SPISD: SPI3 security disabled
SBRSA: Reset default value of SRAM Start address secure
Error: Option Byte SNBRSA not modified as expected: read=0x0 expected=0x1F


Also i was able to import the project to STM32CubeIDE 1.11.0 and build successfully, in-fact i was able to flash BFU, SECore and application firmware.

Getting this log when i flash BFU

###########################################
# 0- Set all global variables
###########################################
###########################################
# 1- Disable security
###########################################
###########################################
# 1- Disable security
###########################################
RDP: Read Out protection Level 1
RDP+ESE: Read Out protection Level 0 + Security disabled
WRP: Write Protection disabled
------ User Configuration ------
nRST: No reset generated when entering the Stop/Standby/Shutdown modes
WDG_SW: Software window/independent watchdogs
IWDG: Independent watchdog counter frozen in Stop/Standby modes
BOOT: CPU1+CPU2 CM0+ Boot lock disabled
------ Security Configuration ------
HDPAD: User Flash hide protection area access disabled
SPISD: SPI3 security disabled
SBRSA: Reset default value of SRAM Start address secure
Error: Option Byte SNBRSA not modified as expected: read=0x0 expected=0x1F


Also after Application flash, i get this logs

MW_LORAWAN_VERSION:  V2.6.2
MW_RADIO_VERSION:    V1.3.1
L2_SPEC_VERSION:     V1.0.4
RP_SPEC_VERSION:     V2-1.0.3
###### AppKey:      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
###### NwkKey:      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
###### AppSKey:     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
###### NwkSKey:     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
###### DevEUI:      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
###### AppEUI:      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
###### DevAddr:     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
###### KMS ENABLED 
4s174:TX on freq 868300000 Hz at DR 0
9s088:MAC txTimeOut

###### = JOIN FAILED


After power cycle i am just stuck at BFU.
Also i am not sure i read somewhere for single core i don't need KMS. I am not sure about this.

So my question is., Is there any simple way to build a project ready for FUOTA?
I have three working projects i build with SDK 1.3.1, 1.4.0 and 1.5.0. I switched from 1.5.0 to 1.4.0 because 1.5.0 doesn't have any FUOTA related examples.

Also i was thinking, the ST's example is basically how ST processes the FUOTA fragments, add security etc, then why can't i use my own application do that. I have working example with uplink, unconfirmed and confirmed downlinks work. If i request version at port 202 that works, i could easily make my own application doing that.

But i need a right guidance, should i spend my time porting the st's example to my chip or should i just start my own design for FUOTA. Let me know?


Also if i am doing anything wrong and its really simple then point me to right direction.

Best regards,
Devjeet Mandal.

P.S The labels are arbitrary because i could not find label STM32WL

1 REPLY 1
Imen.D
ST Employee

Hello @devjeet-adben ,

I recommend you follow this application note AN5554 LoRaWAN® firmware update over the air with STM32CubeWL up to v1.4.0. This will help you on your project implementation.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen