Digi International Inc XBEEPRO2 Manual Do Utilizador

Página de 155
XBee®/XBee‐PRO® ZB RF Modules 
© 2011 Digi International, Inc.
     140
Programming XBee Modules
Firmware on the XBee and XBee-PRO ZB modules can be updated through one of two means:
•Serially
•SIF header.
Each method is described below.  
Where possible, configuration settings are retained regardless of firmware changes.  This can lead to difficulties, 
especially when changing firmware among variants of the same release with different default config settings.  The 
best practice after changing a firmware load is to do a RE (reset to factory defaults), explicitly set the configuration 
registers to desired settings, and then do a WR (write config settings).
Serial Firmware Updates
Serial firmware updates make use of the XBee custom bootloader which ships in all units. This modified 
bootloader is based on Ember's standalone bootloader, but with a modified entry mechanism. The modified 
entry mechanism uses module pins 3, 9, and 16 (DIN, DTR, and RTS respectively). 
The X-CTU program can update firmware serially on the XBee and XBee-PRO ZB modules. Contact Digi support 
for details.
If an application requires custom firmware to update the XBee firmware serially, the following steps are 
required.
Invoke XBee Bootloader
See the "XBee Bootloader" section above for steps to invoke the bootloader.
Send Firmware Image
After invoking the bootloader, the Ember bootloader will send the bootloader menu characters out the UART at 
115200 bps. The application should do the following 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 EM250 waits for an XModem CRC upload of an .ebl image over the serial line at 
115200 bps. The .ebl file must be sent to the EM250 in order. 
If no serial transaction is initiated within a 60 second timeout period, the bootloader times out and returns to 
the menu. If the upload is interrupted with a power cycle or reset event, the EM250 will detect an invalid 
application image and enter bootloader mode. The entire ebl image should be uploaded again to recover. If an 
error occurs while uploading, the EM250 bootloader returns an error code from the following table:
Hex Error Code
Description
0x21
The bootloader encountered an error while 
trying to parse the Start of Header (SOH) 
character in the XModem frame.
0x22
The bootloader detected an invalid checksum 
in the XModem frame.
0x23
The bootloader encountered an error while 
trying to parse the high byte of the CRC in the 
XModem frame.
0x24
The bootloader encountered an error while 
trying to parse the low byte of the CRC in the 
XModem frame.
0x25
The bootloader encountered an error in the 
sequence number of the current XModem 
frame.
0x26
The frame that the bootloader was trying to 
parse was deemed incomplete (some bytes 
missing or lost).