Flash Layout for On-Chip OAD

This section will describe the method for placing images in internal flash when using on-chip OAD.

Constraints and Requirements for On-chip OAD (stack library)

In order to perform an On-chip OAD the target system must have:

  • The user application must be sufficiently small in order to fit into the flash layout system described below
  • User app functionality is lost while performing OAD (Persistent app is running)

Only one user application image may be stored in flash at any time.

Internal Flash Memory Layout

The internal flash of the device contains the active user application, the user application’s stack, the persistent application, the persistent application’s stack, and the BIM. Each application’s role is defined below.

Note

As we have assumed the stack-library approach, the stack images referenced below are a part of each application image (i.e. the user and persistent apps have their own dedicated stack)

Application Name Description
BIM
  • Search for the proper image in FLASH
  • Copy new user image
  • Ensure validity and optionally security of image before running
Persistent application
  • Providing lightweight application that implements the OAD profile
Stack (2)
  • BLE protocol stack implementation
User application
  • User application
  • Must implement OAD reset service
../_images/ditaa-a235c22bb809e602eef9d1298c4e0b0431aa9239.png

The user application (referred to as OAD_IMG_B) pictured above is responsible for the following:

  • Implementing the protocol stack definition of the OAD reset service
  • Implementing customer defined behavior

The persistent application (referred to as OAD_IMG_A) pictured above is responsible for the following:

  • Implementing the protocol stack definition of the OAD service This image
  • is permanently resident on the device