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

PSoC™ 4

HeGi_2497906
Level 5
100 replies posted 50 replies posted 25 replies posted
Level 5
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
100 replies posted 50 replies posted 25 replies posted
Level 5

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
Yugandhar
Moderator
Moderator First comment on blog 750 replies posted 500 replies posted
Moderator

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
100 replies posted 50 replies posted 25 replies posted
Level 5

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
100 replies posted 50 replies posted 25 replies posted
Level 5

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
100 replies posted 50 replies posted 25 replies posted
Level 5

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