Bootloading#
The NCP can enter bootload mode through either a software command or a hardware toggle.
Software Bootloading#
When operating in EZSP mode, issuing the bootloader frame launchStandaloneBootloader will cause the NCP to enter into the bootloader. This can be used at any time when the Host wants to restart the NCP in the bootloader.
Hardware Bootloading#
Asserting the bootloader pin (low) while powering up or resetting the NCP will cause the chip to enter the bootloader instead of resuming normal NCP operation. In the Gecko Bootloader, a recovery pin can be defined in the board configuration to initiate bootloader mode. You define the recovery pin using the Gecko Bootloader's "GPIO Activation" component located in Platform > Utils, where the SL_BTL_BUTTON can be configured.
An example of performing this reset would be as follows:
Assert nRESET to hold the NCP in reset.
While nRESET is asserted, assert BOOTLOAD, and then deassert nRESET to boot the NCP.
The BOOTLOAD line can be deasserted once the reset line has been deasserted.
For more information on using the Gecko Bootloader, see UG266: Silicon Labs Gecko Bootloader User's Guide for GSDK 3.2 and Low- er or UG489: Silicon Labs Gecko Bootloader User's Guide for GSDK 4.0 and Higher.
Entering Bootloader Mode via CPC#
If EZSP is being run over CPC, CPCD can set the NCP into bootloader mode. CPCD does this by either sending a software reset frame to the NCP or by directly toggling the NCP bootloader pins, similarly to section 6.2. The user can configure the CPCD bootloader pins in the CPCD.Conf configuration file. Another advantage of using CPCD is that CPCD includes a built in command to upgrade the NCP firmware. This can be done by running CPCD with the -f flag, which points to the firmware file to upgrade. More documentation on firmware upgrade with CPCD can be found in the Silicon Labs CPCD gihtub repository: https://github.com/SiliconLabs/cpc-daemon/blob/main/doc/firmware_upgrade.md.
Bootloader Operation#
The target device’s bootloader sends output over its serial port after it receives a carriage return from the source device at the expected baud rate. This prevents the bootloader from prematurely sending commands that might be misinterpreted by other devices that are connected to the serial port. Note that serial bootloaders typically do not enforce any timeout when awaiting the initial serial handshake via carriage return, so the bootloader will wait indefinitely in this mode until guided by the source device or until the chip is reset.
After the bootloader receives a carriage return from the target device, it displays a menu with the following ASCII-based output (where X.Y.A corresponds to the major, minor, and sub-minor fields of the bootloader version number, respectively).
Gecko Bootloader vX.Y.A
1. upload gbl
2. Run
3. ebl info
BL >Once this is received, the Host can be assured that the NCP is operating in bootloader mode.