The host project sends two different images to the target device, using a push button for user interaction. USB connection to a computer is not required on either LaunchPad development kit to run the demo; however, each kit should be powered either by a USB connection through the eZ-FET or with steady 3.3-V external power supply to VCC and GND pins (ensure that the eZ-FET is disconnected in this instance). The demo is run using these steps regardless of communication type or image model used:
- Build and download the MSPBoot as described in Section 4.2.3 and build App1 and App2.
- Convert App1 and App2 according to Section 4.1.2.1.
- Build and download the host application as described in Section 4.2.4.
- Connect the boards according to the desired communication type (I2C, UART, or SPI with CC110x).
- Each host project contains a commented diagram at the start of code describing the proper connections.
- Reset and execute code in both devices.
- To enter the target bootloader mode (indicated by both LED1 and LED2 remaining on):
- If the target does not have a valid application (default), the target stays in bootloader mode.
- Bootloader mode can be forced in hardware by pressing and holding the S2 button on the target device while pressing and releasing the reset button.
- If running an application:
- APP1 jumps to bootloader mode when the S2 button is pressed on the target device.
- APP2 jumps to bootloader mode when it receives the Force Boot command (supported only if CI PHY-DL is shared).
- Press the S2 button on the host board. The host device performs the following sequence of commands:
- Toggles LED1 twice.
- Sends “Force Boot” command (0xAA).
- If the target device is already in bootloader mode, it discards the packet, because the CRC is incorrect.
- If the target is running APP2, the target device enters bootloader mode.
- Requests the bootloader version (sends the TX_VERSION command).
- If the target response is 0xA1 (expected from BSL protocol), the host continues.
- If the target response is any other value, the host aborts transaction.
- Erases the target application area (sends the ERASE_APP command).
- Sends APP1 (uses the RX_DATA_BLOCK commands).
- Programs CRC of APP1 (uses the RX_DATA_BLOCK command).
- Forces the target application to run (sends the JUMP2APP command).
- Toggles LED1 twice to indicate successful transfer, and keeps LED1 on to show that the host is now ready to send APP2.
- Target starts running APP1 upon completion of transfer.
- The target device blinks LED1.
- LED1 blinks at a periodic interval using the timer.
- Press the S2 button on the target board to enter bootloader mode.
- With the target in bootloader mode, press the S2 button on the host board to send APP2. When finished and done toggling, LED1 of the host board stays off to indicate that APP1 is now ready to be sent.
- Target starts running APP2 upon completion of transfer.
- The target device blinks LED2.
- Press the S2 button on the target board to toggle LED2.
- Because the CI is initialized, the host can send a Force Boot command to force bootloader mode in the target device at the start of a new transfer sequence.
- Press the S2 button on the host to start a new sequence sending APP1 again.
Dual-image mode contains a brief pause from the host after the transfer is complete while it validates the download area, transfers the memory into the application space, and erases the download area after the application area is validated by a CRC-CCITT check.