Skip to main content
TGats.2
Associate II
August 22, 2021
Question

OTA Reset Manager is not jumping to user application

  • August 22, 2021
  • 1 reply
  • 897 views

Hi

I'm trying to enable OTA Service on my device with the BlueNRG2 Chip.

I use the Lower Application Scheme. Therefore I flash the BLE_OTA_ResetManager at the flash beginn at 0x10040000. (I did a mass erase before that). I didn't modify the OTA ResetManager application, I took it from the BlueNrg-1.2 DK 3.2.1 example project.

Then I flash the user application with enabled OTA service at 0x10040800 as described in the documentation. I tried it also with the given example projects BLE_Chat or BLE_Beacon, but the Reset manager is never jumping to the application.

I can see that the reset manager reads correctly the AA5555AA tag at the correct location and get therefore the correct application to jump. But after the Jump_to_Application() call, it seems that it falls into a hard fault and makes then reset. And this will then happen in an endloos loop.

Do I missunderstand something or what is wrong with my code/approach?

Many thanks for every hint!

Code of the main function of the OTA_Reset_manager:

int main(void) 
{
 pFunction Jump_To_Application;
 uint32_t JumpAddress, appAddress;
 
 /* Identifies the valid application where to jump based on the OTA application validity tags values placed on
 reserved vector table entry: OTA_TAG_VECTOR_TABLE_ENTRY_INDEX */
 appAddress = OTA_Check_Application_Tags_Value();
 
 if (appAddress == 0) {
 /* This case indicates that no valida application is present and normally should not happen */
 while (1);
 }
 
 /* Jump to user application */
 JumpAddress = *(__IO uint32_t*) (appAddress + 4);
 Jump_To_Application = (pFunction) JumpAddress;
 /* Initialize user application's Stack Pointer */
 __set_MSP(*(__IO uint32_t*) appAddress);
 Jump_To_Application();
 
 /* Infinite loop */
 while (1)
 {
 }
}

Many thanks.

Tobias

This topic has been closed for replies.

1 reply

TGats.2
TGats.2Author
Associate II
August 25, 2021

My mapper file had an issue, it linked the application to the same address as the reset manager was.

Issue can be closed.

Many thanks for your attention.