See Standalone for detailed documentation.

License#

Copyright 2018 Silicon Laboratories Inc. www.silabs.com

The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at www.silabs.com/about-us/legal/master-software-license-agreement. This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.

/***************************************************************************/
#ifndef __STANDALONE_BOOTLOADER_H__
#define __STANDALONE_BOOTLOADER_H__


void bootloaderMenu(void);


BL_Status receiveImage(uint8_t commState);

bool checkDebugMenuOption(uint8_t ch);

BL_Status initOtaState(void);

BL_Status checkOtaStart(void);

BL_Status receiveOtaImage(void);

bool paIsPresent(void);

bool halCheckIntegrity(void);

#endif //__STANDALONE_BOOTLOADER_H__

Required Custom Functions#

void

This function must be implemented, providing a bootloader menu.

Available Bootloader Library Functions#

Functions implemented by the bootloader library that may be used by custom functions.

receiveImage(uint8_t commState)

Puts the bootloader into a mode where it will receive an image. commState indicates whether the image is received via serial (COMM_SERIAL) or over the air (COMM_RADIO)

bool

A hook to the bootloader library for it to check for extra menu options. Only used for ember internal debug builds, not normally needed.

Initialize OTA Bootloader state.

Check to see if the bootloader has detected an OTA upload start.

Puts the bootloader into a mode where it will receive an image over the air. The function checkOtaStart() should have been called first and it should have returned with a status of BL_SUCCESS before calling this function.

bool

Uses the information in the PHY_CONFIG token to determine if a power amplifier is present in the node design.

bool

Validate application integrity by running AES-MMO hash and comparing to AAT.

Required Custom Functions Documentation#

bootloaderMenu#

void bootloaderMenu (void )

This function must be implemented, providing a bootloader menu.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Available Bootloader Library Functions Documentation#

receiveImage#

BL_Status receiveImage (uint8_t commState)

Puts the bootloader into a mode where it will receive an image. commState indicates whether the image is received via serial (COMM_SERIAL) or over the air (COMM_RADIO)

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AcommState

checkDebugMenuOption#

bool checkDebugMenuOption (uint8_t ch)

A hook to the bootloader library for it to check for extra menu options. Only used for ember internal debug builds, not normally needed.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Ach

Returns

  • true if the option was handled, false if not.


initOtaState#

BL_Status initOtaState (void )

Initialize OTA Bootloader state.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • OTA support hooks are subject to change!

Returns


checkOtaStart#

BL_Status checkOtaStart (void )

Check to see if the bootloader has detected an OTA upload start.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • OTA support hooks are subject to change!

Returns


receiveOtaImage#

BL_Status receiveOtaImage (void )

Puts the bootloader into a mode where it will receive an image over the air. The function checkOtaStart() should have been called first and it should have returned with a status of BL_SUCCESS before calling this function.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • OTA support hooks are subject to change!

Returns


paIsPresent#

bool paIsPresent (void )

Uses the information in the PHY_CONFIG token to determine if a power amplifier is present in the node design.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function must not be called before emBootloaderRadioBoot().

Returns

  • true if a power amplifier is present, false otherwise.


halCheckIntegrity#

bool halCheckIntegrity (void )

Validate application integrity by running AES-MMO hash and comparing to AAT.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • false if fails integrity check, true if pass