1.7.1.4 Storage

The storage application file:
  • Generates the Extended Address (EUI64).
  • Manages non-volatile data storage. The G3 stack needs to store in non-volatile memory some counters.
There are some functions that are called from G3 management application:
  • APP_STORAGE_GetExtendedAddress(): Returns the generated Extended Address (EUI64).
  • APP_STORAGE_GetNonVolatileData(): Returns the non-volatile data, read at initialization.
  • APP_STORAGE_UpdateNonVolatileData(): Updates the non-volatile data.

The implementation is different depending on the MCU device.

For PIC32CXMT devices (app_storate_pic32cxmt.c):
  • Extended Address (EUI64) is generated using the UniqueID.
  • Non-volatile data is stored in User Signature. When non-volatile data is updated (APP_STORAGE_UpdateNonVolatileData() function) it is stored in GPBR (volatile, but faster write access). SUPC power-down detection is used to store non-volatile data in User Signature (non-volatile, but slower write access) just before the power is down (_SUPC_PowerDownCallback() function).
For WBZ45 devices (app_storate_wbz451.c):
  • Extended Address (EUI64) is generated using the True Random Number Generator (TRNG). Once it is generated the first time, it is stored in Persistent Data Server (PDS).
  • Non-volatile data is stored in Persistent Data Server (PDS).