Legacy HAL#

The Legacy HAL is an implementation of the Hardware Abstraction Layer (HAL) that was used by the Zigbee EmberZNet and Flex Connect stacks before their transition to the new component-based architecture (Zigbee version 7.0 and Connect version 3.0).

This component is not a complete duplicate of the old HAL. It only contains the most commonly used pieces to enable our networking stacks and sample applications and to support porting customer applications to the new component-based implementation. Currently, Zigbee and Connect sample applications are dependent on this component. Eventually, they will be ported to use new HAL components directly so that this component can become optional or be deprecated. Note

  • This component is only designed to be used with Zigbee and Connect stack applications. Do not use with any other stacks as it will likely introduce problems.

Modules#

HalEepromInformationType

EepromStateType

Application Bootloader Interface

Button

Common Bootloader

Cyclic Redundancy Check

Diagnostics

LED

Microcontroller functions

Random Numbers

Reset Cause Definitions

SimEE2 to NVM3 Upgrade

Simulated EEPROM 1 and 2

Standalone Bootloader

Functions#

Call this function to get information about the external EEPROM and its capabilities.

EmberStatus
halCommonIdleForMilliseconds(uint32_t *duration)

Macros#

#define

Definition of an EEPROM page size, in bytes.

#define

Define the location of the first page in EEPROM.

#define
EEPROM_IMAGE_START (EEPROM_FIRST_PAGE * EEPROM_PAGE_SIZE)

Define the location of the image start in EEPROM as a function of the EEPROM_FIRST_PAGE and EEPROM_PAGE_SIZE.

#define

Define EEPROM success status.

#define

Define EEPROM error status.

#define

Define EEPROM error mask.

#define

Define EEPROM page boundary error.

#define

Define EEPROM page size error.

#define

Define EEPROM write data error.

#define

Define EEPROM image too large error.

#define

Define EEPROM invalid address error.

#define

Define EEPROM chip initialization error.

#define

Define EEPROM erase required error.

#define

Define EEPROM error for no erase support.

#define

The current version of the HalEepromInformationType data structure.

#define

Eeprom capabilites mask that indicates the erase API is supported.

#define

Eeprom capabilites mask that indicates page erasing is required before new data can be written to a device.

#define

Eeprom capabilites mask that indicates that the write routine is blocking on this device.

#define

Eeprom capabilites mask that indicates that the erase routine is blocking on this device.

#define

Eeprom capabilities mask that indicateds that the partEraseTime field of HalEepromInformationType is in seconds instead of the usual millisecondss.

Function Documentation#

halEepromInfo#

const HalEepromInformationType * halEepromInfo (void )

Call this function to get information about the external EEPROM and its capabilities.

Parameters
N/A

The format of this call must not be altered. However, the content can be changed to work with a different device.

Returns


Definition at line 166 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

halCommonGetInt16uMillisecondTick#

uint16_t halCommonGetInt16uMillisecondTick (void )
Parameters
N/A

Definition at line 81 of file platform/service/legacy_hal/inc/hal.h

halCommonGetInt32uMillisecondTick#

uint32_t halCommonGetInt32uMillisecondTick (void )
Parameters
N/A

Definition at line 82 of file platform/service/legacy_hal/inc/hal.h

halCommonGetInt64uMillisecondTick#

uint64_t halCommonGetInt64uMillisecondTick (void )
Parameters
N/A

Definition at line 83 of file platform/service/legacy_hal/inc/hal.h

halCommonGetInt16uQuarterSecondTick#

uint16_t halCommonGetInt16uQuarterSecondTick (void )
Parameters
N/A

Definition at line 84 of file platform/service/legacy_hal/inc/hal.h

halInternalStartSystemTimer#

uint16_t halInternalStartSystemTimer (void )
Parameters
N/A

Definition at line 85 of file platform/service/legacy_hal/inc/hal.h

halCommonDelayMicroseconds#

void halCommonDelayMicroseconds (uint16_t us)
Parameters
N/Aus

Definition at line 86 of file platform/service/legacy_hal/inc/hal.h

halCommonDelayMilliseconds#

void halCommonDelayMilliseconds (uint16_t ms)
Parameters
N/Ams

Definition at line 87 of file platform/service/legacy_hal/inc/hal.h

halCommonIdleForMilliseconds#

EmberStatus halCommonIdleForMilliseconds (uint32_t * duration)
Parameters
N/Aduration

Definition at line 88 of file platform/service/legacy_hal/inc/hal.h

halStackSymbolDelayAIsr#

void halStackSymbolDelayAIsr (void )
Parameters
N/A

Definition at line 89 of file platform/service/legacy_hal/inc/hal.h

halStackRadioPowerUpBoard#

void halStackRadioPowerUpBoard (void )
Parameters
N/A

Definition at line 90 of file platform/service/legacy_hal/inc/hal.h

halStackRadioPowerDownBoard#

void halStackRadioPowerDownBoard (void )
Parameters
N/A

Definition at line 91 of file platform/service/legacy_hal/inc/hal.h

halStackProcessBootCount#

void halStackProcessBootCount (void )
Parameters
N/A

Definition at line 92 of file platform/service/legacy_hal/inc/hal.h

Macro Definition Documentation#

EEPROM_PAGE_SIZE#

#define EEPROM_PAGE_SIZE
Value:
(128ul)

Definition of an EEPROM page size, in bytes.

This definition is deprecated, and should no longer be used.


Definition at line 30 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_FIRST_PAGE#

#define EEPROM_FIRST_PAGE
Value:
(0)

Define the location of the first page in EEPROM.

This definition is deprecated, and should no longer be used.


Definition at line 35 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_IMAGE_START#

#define EEPROM_IMAGE_START
Value:
(EEPROM_FIRST_PAGE * EEPROM_PAGE_SIZE)

Define the location of the image start in EEPROM as a function of the EEPROM_FIRST_PAGE and EEPROM_PAGE_SIZE.

This definition is deprecated, and should no longer be used.


Definition at line 41 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_SUCCESS#

#define EEPROM_SUCCESS
Value:
0U

Define EEPROM success status.


Definition at line 45 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_ERR#

#define EEPROM_ERR
Value:
1U

Define EEPROM error status.


Definition at line 49 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_ERR_MASK#

#define EEPROM_ERR_MASK
Value:
0x80U

Define EEPROM error mask.


Definition at line 53 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_ERR_PG_BOUNDARY#

#define EEPROM_ERR_PG_BOUNDARY
Value:
0x81U

Define EEPROM page boundary error.


Definition at line 57 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_ERR_PG_SZ#

#define EEPROM_ERR_PG_SZ
Value:
0x82U

Define EEPROM page size error.


Definition at line 61 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_ERR_WRT_DATA#

#define EEPROM_ERR_WRT_DATA
Value:
0x83U

Define EEPROM write data error.


Definition at line 65 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_ERR_IMG_SZ#

#define EEPROM_ERR_IMG_SZ
Value:
0x84U

Define EEPROM image too large error.


Definition at line 69 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_ERR_ADDR#

#define EEPROM_ERR_ADDR
Value:
0x85U

Define EEPROM invalid address error.


Definition at line 73 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_ERR_INVALID_CHIP#

#define EEPROM_ERR_INVALID_CHIP
Value:
0x86U

Define EEPROM chip initialization error.


Definition at line 77 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_ERR_ERASE_REQUIRED#

#define EEPROM_ERR_ERASE_REQUIRED
Value:
0x87U

Define EEPROM erase required error.


Definition at line 81 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_ERR_NO_ERASE_SUPPORT#

#define EEPROM_ERR_NO_ERASE_SUPPORT
Value:
0x88U

Define EEPROM error for no erase support.


Definition at line 85 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_INFO_VERSION#

#define EEPROM_INFO_VERSION
Value:
(0x0202)

The current version of the HalEepromInformationType data structure.


Definition at line 119 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_INFO_MAJOR_VERSION#

#define EEPROM_INFO_MAJOR_VERSION
Value:
(0x0200)

Definition at line 120 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_INFO_MAJOR_VERSION_MASK#

#define EEPROM_INFO_MAJOR_VERSION_MASK
Value:
(0xFF00)

Definition at line 121 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_INFO_MIN_VERSION_WITH_WORD_SIZE_SUPPORT#

#define EEPROM_INFO_MIN_VERSION_WITH_WORD_SIZE_SUPPORT
Value:
0x0102U

Definition at line 130 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_CAPABILITIES_ERASE_SUPPORTED#

#define EEPROM_CAPABILITIES_ERASE_SUPPORTED
Value:
(0x0001U)

Eeprom capabilites mask that indicates the erase API is supported.


Definition at line 134 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_CAPABILITIES_PAGE_ERASE_REQD#

#define EEPROM_CAPABILITIES_PAGE_ERASE_REQD
Value:
(0x0002U)

Eeprom capabilites mask that indicates page erasing is required before new data can be written to a device.


Definition at line 139 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_CAPABILITIES_BLOCKING_WRITE#

#define EEPROM_CAPABILITIES_BLOCKING_WRITE
Value:
(0x0004U)

Eeprom capabilites mask that indicates that the write routine is blocking on this device.


Definition at line 144 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_CAPABILITIES_BLOCKING_ERASE#

#define EEPROM_CAPABILITIES_BLOCKING_ERASE
Value:
(0x0008U)

Eeprom capabilites mask that indicates that the erase routine is blocking on this device.


Definition at line 149 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

EEPROM_CAPABILITIES_PART_ERASE_SECONDS#

#define EEPROM_CAPABILITIES_PART_ERASE_SECONDS
Value:
(0x0010U)

Eeprom capabilities mask that indicateds that the partEraseTime field of HalEepromInformationType is in seconds instead of the usual millisecondss.


Definition at line 155 of file platform/service/legacy_hal/inc/bootloader-eeprom.h

simulatedTimePasses#

#define simulatedTimePasses

Definition at line 76 of file platform/service/legacy_hal/inc/hal.h