TI BLE-Stack for Bluetooth 4.2 API Documentation  3.02.03.00
Files | Macros | Variables
OAD External Flash Layout

Contains common structures and defines related to external flash layout as it for the OAD usecase. More...

Files

file  ext_flash_layout.h
 Contains common structures and defines related to external flash layout as it for the OAD usecase.
 

Macros

#define EFL_ADDR_META   0x00000
 
#define EFL_ADDR_META_FACT_IMG   EFL_ADDR_META
 
#define EFL_APP_IMG_SZ   0x10000
 
#define EFL_FACT_IMG_0_ADDR   EFL_FLASH_SIZE - EFL_MAX_IMG_SZ
 
#define EFL_FACT_IMG_1_ADDR   EFL_FACT_IMG_0_ADDR - EFL_MAX_IMG_SZ
 
#define EFL_FACT_IMG_META_PG   0
 
#define EFL_IMG_SPACE_END   (EFL_FACT_IMG_1_ADDR - 1)
 
#define EFL_IMG_SPACE_START   EFL_APP_IMG_SZ
 
#define EFL_IMG_STR_ADDR_OFFSET   offsetof(ExtImageInfo_t, extFlAddr)
 
#define EFL_MAX_IMG_SZ   0x20000
 
#define EFL_MAX_META   4
 
#define EFL_META_COPY_SZ
 
#define EFL_META_COUNTER_OFFSET   offsetof(ExtImageInfo_t, counter)
 
#define EFL_META_PG_INVALID   0xFF
 
#define EFL_METADATA_LEN   sizeof(ExtImageInfo_t)
 
#define EFL_NUM_FACT_IMAGES   2
 
#define EFL_PAGE_SIZE   0x1000
 
#define EFL_SIZE_META   EFL_PAGE_SIZE
 
#define EFL_USR_AREA_ADDR   EFL_SIZE_META*EFL_MAX_META
 
#define EFL_USR_AREA_SZ   EFL_IMG_SPACE_START - EFL_USR_AREA_ADDR
 
#define OAD_EFL_MAGIC   {'O', 'A', 'D', ' ', 'N', 'V', 'M', '1'}
 
#define OAD_EFL_MAGIC_SZ   8
 

Variables

uint32_t counter
 Timestamp/counter of image.
 
uint32_t extFlAddr
 Location of the image in ext flash.
 
 ExtImageInfo_t
 
 TYPEDEF_STRUCT_PACKED
 External flash image header used to populate the table of image headers in external flash. More...
 

Detailed Description

Contains common structures and defines related to external flash layout as it for the OAD usecase.

============================================================================

Header Include

The external flash layout file should be included in an OAD enabled application as follows:

#include <common/cc26xx/oad/ext_flash_layout.h>

Overview

The OAD external flash header is used to build up a table of all images that currently reside in external flash, and gives the OAD user application a way to easily collect information about the images. More information about the external flash header and the external flash layout can be found in the Over the Air Download (OAD) section of your protocol stack's User Guide.

Macro Definition Documentation

§ EFL_ADDR_META

#define EFL_ADDR_META   0x00000

Address at which the table of external flash image structures start Each record is populated by ExtImageInfo_t

§ EFL_ADDR_META_FACT_IMG

#define EFL_ADDR_META_FACT_IMG   EFL_ADDR_META

The address of the external flash header for the factory image

§ EFL_APP_IMG_SZ

#define EFL_APP_IMG_SZ   0x10000

Application image size on external flash

§ EFL_FACT_IMG_0_ADDR

#define EFL_FACT_IMG_0_ADDR   EFL_FLASH_SIZE - EFL_MAX_IMG_SZ

Storage address of factory image 0 on the external flash

§ EFL_FACT_IMG_1_ADDR

#define EFL_FACT_IMG_1_ADDR   EFL_FACT_IMG_0_ADDR - EFL_MAX_IMG_SZ

Storage address of factory image 1 on the external flash

§ EFL_FACT_IMG_META_PG

#define EFL_FACT_IMG_META_PG   0

The page in which the external flash image header of the factory image resides

§ EFL_IMG_SPACE_END

#define EFL_IMG_SPACE_END   (EFL_FACT_IMG_1_ADDR - 1)

End address of image storage on external flash

§ EFL_IMG_SPACE_START

#define EFL_IMG_SPACE_START   EFL_APP_IMG_SZ

Start address of downloaded image storage on external flash

§ EFL_IMG_STR_ADDR_OFFSET

#define EFL_IMG_STR_ADDR_OFFSET   offsetof(ExtImageInfo_t, extFlAddr)

Offset of the image address in external flash into the ExtImageInfo_t structure

§ EFL_MAX_IMG_SZ

#define EFL_MAX_IMG_SZ   0x20000

Maximum image size on external flash

§ EFL_MAX_META

#define EFL_MAX_META   4

Maximum number of external flash metadata pages

§ EFL_META_COPY_SZ

#define EFL_META_COPY_SZ
Value:
offsetof(ExtImageInfo_t, fixedHdr.rfu) + \
sizeof(((ExtImageInfo_t){0}).fixedHdr.rfu)

Size of core header portion to copy

§ EFL_META_COUNTER_OFFSET

#define EFL_META_COUNTER_OFFSET   offsetof(ExtImageInfo_t, counter)

Offset of the timestamp/counter into the ExtImageInfo_t structure

§ EFL_META_PG_INVALID

#define EFL_META_PG_INVALID   0xFF

Flag to indicate that the candidate external flash image header page is invalid

§ EFL_METADATA_LEN

#define EFL_METADATA_LEN   sizeof(ExtImageInfo_t)

Length of ExtImageInfo_t structure in bytes

§ EFL_NUM_FACT_IMAGES

#define EFL_NUM_FACT_IMAGES   2

Number of factory images on external flash

§ EFL_PAGE_SIZE

#define EFL_PAGE_SIZE   0x1000

External flash page size

§ EFL_SIZE_META

#define EFL_SIZE_META   EFL_PAGE_SIZE

Size of each entry in the external flash image header table Entries in the table are page aligned to allow for easy erasing

§ EFL_USR_AREA_ADDR

#define EFL_USR_AREA_ADDR   EFL_SIZE_META*EFL_MAX_META

Storage address of user define data on the external flash

§ EFL_USR_AREA_SZ

#define EFL_USR_AREA_SZ   EFL_IMG_SPACE_START - EFL_USR_AREA_ADDR

Size of user define data on the external flash

§ OAD_EFL_MAGIC

#define OAD_EFL_MAGIC   {'O', 'A', 'D', ' ', 'N', 'V', 'M', '1'}

Magic number used by entries in the image header table at the beginning of external flash. Note this is different from OAD_IMG_ID_VAL so that the application can determine the difference between an entry in the header table and the start of an OAD image

Note
This is only used by off-chip OAD

§ OAD_EFL_MAGIC_SZ

#define OAD_EFL_MAGIC_SZ   8

Length of external flash magic string, this is the length of OAD_EFL_MAGIC_SZ

Variable Documentation

§ TYPEDEF_STRUCT_PACKED

TYPEDEF_STRUCT_PACKED
Initial value:
{
imgFixedHdr_t fixedHdr

External flash image header used to populate the table of image headers in external flash.

This is the core image header

© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale