
Module support
Writing custom firmware
XBee/XBee-PRO® S2C ZigBee® RF Module
262
mechanism uses device pins 4, 10, and 29 (DIN, DTR, and RTS respectively) on the SMT, and pins 3, 9,
16 on the TH.
XCTU can update firmware serially on the XBee. Contact Digi support for details.
If an application requires custom firmware to update the XBee firmware serially, complete the
following steps.
Invoke the XBee Bootloader
See
for steps to invoke the bootloader using RS-232 signals. You can also invoke the
bootloader by issuing a command using XCTU. The application makes an explicit call to the bootloader,
which does not return.
If there is no valid application, the bootloader always runs.
Send a firmware image
After invoking the bootloader, the Ember bootloader sends the bootloader menu characters out the
serial port, which may be the UART at 115200 b/s or the SPI, where the attached SPI master provides
the clock rate. To upload a firmware image:
1. Look for the bootloader prompt
BL
> to ensure the bootloader is active.
2. Send an ASCII
1
character to initiate a firmware update.
3. After sending a
1
, the EM357 waits for an XModem CRC upload of an.ebl image over the serial
line at 115200 b/s. Send the .ebl file to the EM357 in order.
If the firmware image is successfully loaded, the bootloader outputs a “complete” string. Invoke the
newly loaded firmware by sending a
2
to the device.
If the firmware image is not successfully loaded, the bootloader outputs an "aborted string". It return
to the main bootloader menu. Some causes for failure are:
n
Over 1 minute passes after the command to send the firmware image and the first block of the
image has not yet been sent.
n
A power cycle or reset event occurs during the firmware load.
n
A file error or a flash error occurs during the firmware load.
Writing custom firmware
You can use the XBee module as a hardware development platform for the EM357. You can develop
custom firmware images around the EmberZNet 4.2.xx mesh stacks (for the EM357) and uploaded to
the XBee.
CAUTION!
If you are programming firmware through the JTAG interface, you can
potentially erase the XBee bootloader. If this occurs, serial firmware updates will not
work.
Regulatory compliance
XBee modules are FCC and European certified for operation on all 16 channels. You can configure the
EM357 output power up to 8 dBm with boost mode enabled on channels 11 through 25. On channel 26
you must reduce the power to 3 dBm.