CommunicationComponents

Description

Host communication interface.

The Communication component provides an interface for implementing communication with a host device, such as a computer or a microcontroller.

Communication Protocol Implementations

Several components implement the communication interface, using different transports and protocols.

BGAPI UART DFU

By enabling the BGAPI communication component, the bootloader communication interface implements the UART DFU protocol using BGAPI commands. This component makes the bootloader compatible with the legacy UART bootloader that was previously released with the Silicon Labs Bluetooth stack.

EZSP-SPI

By enabling the EZSP-SPI communication component, the bootloader communication interface implements the EZSP protocol over SPI. This component makes the bootloader compatible with the legacy ezsp-spi-bootloader that was previously released with the EmberZnet and SL-Thread wireless stacks.

UART XMODEM

By enabling the UART XMODEM communication component, the bootloader communication interface implements the XMODEM-CRC protocol over UART. This component makes the bootloader compatible with the legacy serial-uart-bootloader that was previously released with the EmberZnet and SL-Thread wireless stacks.

Modules

Utils
 

Functions

void communication_init (void)
 
int32_t communication_start (void)
 
int32_t communication_main (void)
 
void communication_shutdown (void)
 

Function Documentation

void communication_init ( void  )

Initialize hardware for the communication component.

int32_t communication_start ( void  )

Initialize communication between the bootloader and external host. E.g. indicate to the external host that we're alive and kicking.

Returns
Error code indicating success or failure
Return values
BOOTLOADER_OKon success
BOOTLOADER_ERROR_COMMUNICATION_STARTon failure
int32_t communication_main ( void  )

This function is not supposed to return until the host signals the end of the current session, or a new image has been flashed and verified.

Returns
Error code indicating sucess or failure
Return values
BOOTLOADER_OKwhen a new image was flashed
BOOTLOADER_ERROR_COMMUNICATION_ERRORon communication error
BOOTLOADER_ERROR_COMMUNICATION_DONEwhen no image was received
BOOTLOADER_ERROR_COMMUNICATION_IMAGE_ERRORwhen received image is invalid
void communication_shutdown ( void  )

Stop communication between the bootloader and external host.