cancel
Showing results for 
Search instead for 
Did you mean: 

Writing in NVM on BlueNRG-LP seems to disrupt OTA service manager

CamT
Associate

Hello

In my project I would like to store some data in the flash memory. For that I have a BlueNRG-LP and I use the OTA service manager, the memory map, as it is defined in the linker script, is as follow :

#ifdef CONFIG_OTA_USE_SERVICE_MANAGER
  /* This configuration is intended for application supporting OTA firmware upgrade with independent OTA firmware upgrade service manager
  (app in the upper part of memory map) */
  /*
     BlueNRG-1 OTA firmware upgrade support for service manager application memory map
     +-----------------------+ 0x2000FFFF
     |  RAM (64K)            |
     +-----------------------+ 0x20000000
     |                       |
     |                       |
     +-----------------------+ 0x10080000
     |                       |
     |  NVM(4K)              |
     +-----------------------+ 0x1007F000
     |                       |
     |  User app (162K)      |
     +-----------------------+ 0x10056800
     |  OTA Service          |
     |  Manager (90K)        |
     +-----------------------+ 0x10040000
     |                       |
     +-----------------------| 0x100017FF
     |   ROM (6K)            |
     +-----------------------+ 0x10000000
  */
 
 /* Including OTA firmware upgrade service manager application */
#define SERVICE_MANAGER_SIZE     (0x16800)
 
#define MEMORY_FLASH_APP_SIZE  (_MEMORY_FLASH_SIZE_ - SERVICE_MANAGER_SIZE - FLASH_NVM_DATASIZE)
#define MEMORY_FLASH_APP_OFFSET  (SERVICE_MANAGER_SIZE)

In the file nvm_db_conf.h I can choose between two presets, as I understand the first one uses the 4k of the NVM and the second one, that I chose, uses only the upper 2k of the memory leaving the lower 2k for personal use.

At this point calling the OTA service manager works fine. But after writing in the lower part of the NVM the code doesn't jump to the OTA service manager and freezes.

Any help would be appreciated

0 REPLIES 0