Fixed Stack Bootloader not functioning propoerly

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
HeGi_2497906
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted
When we take the attached program and directly program the board, it works, runs to the program, program works, all is well.  When you power cycle the unit, the device will not leave the bootloader, it is stuck in OTA_MANDATORY boot_loader.c line 121, and we cannot figure out why.
 
0 Likes
1 Solution
HeGi_2497906
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

For anyone who is reading this thread, the answer was that the internal flash memory we were using to store data was not the USER FLASH, but SFLASH and we were crushing our boot loader data, causing the bootloader to keep triggering.  It worked on the first program, because we had not written to flash yet in the main program.

 

View solution in original post

0 Likes
4 Replies
lock attach
Attachments are accessible only for community members.
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

Did you check 'BLE_OTA_FixedStack_Bootloadable' and 'BLE_OTA_FixedStack_Bootloader' code example projects from the PSoC Creator ? Please let me know your observations on this example project.

BondMgmt.h file is missing in the project. Could you please share this file.

Thanks,

P Yugandhar.

0 Likes
HeGi_2497906
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

P Yugandhar, thank you for your reply, we based the project on that example and have used it on four different projects successfully, but cannot get this one to work.

You say bond management is missing the project, in the bootloader, or bootloadable?

Thanks for the support, we are super stuck here and need to solve this asap.

 

0 Likes
HeGi_2497906
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

Adding back in BondMgmt.h had no effect.

We need to resolve this, who can tell us why the code is stuck in the bootloader and how to fix it?

BTW, I cited the wrong file in the original posting, we are stuck on line 121 of the file boot_loader.c in the generated source and we do not understand why the target is wrong, it is pointing at the bootloader 0x80, not the bootloadable 0x40.  Where is this set?

#define Bootloader_SCHEDULE_BTLDB (0x80u)
#define Bootloader_SCHEDULE_BTLDR (0x40u)

0 Likes
HeGi_2497906
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

For anyone who is reading this thread, the answer was that the internal flash memory we were using to store data was not the USER FLASH, but SFLASH and we were crushing our boot loader data, causing the bootloader to keep triggering.  It worked on the first program, because we had not written to flash yet in the main program.

 

0 Likes