XBEE resetting itself after power cycle

I have a board that I’ve been using for quite a few years now. It uses XBEE 802.15.4 through-hole chips with the short wire antenna connected straight on the chip. The chip only has pins 1 (3.3V), 2 (DOUT), 3 (DIN), 9 (Sleep), 10 (GND) and 12 (CTS) connected, all other are floating. Other than a pull-up resistor on DIN, all pins are connected straight to an ATMEGA644P. I use it for communication to other boards of the same type.


This has worked for years but a new batch of boards have an ATMEGA1284 which has been tested with new firmware and working in other similar boards. For some reason though, when loaded these new boards are somehow resetting the XBEE to default settings every time the power is cycled. I use the XBEEs in API mode at 38400 BAUD. I also have a process to enter the XBEE into AT command mode (by sending ‘+++’) to change these settings if it is at default but I cannot figure out why they are resetting.

I have probed the DOUT and DIN lines and can see they expected messages going back and forth including the WR command with a positive response from the XBEE. However, when I reset the power I see 9 bytes of data stream from the XBEE at 9600 BAUD, not the expected 38400. The bytes are the normal ‘modem status’ message, which is only 6 bytes and tells me the xbee has turned on. Then after that, with no gap at all is the ‘OK’ sequence, which is sent in response to AT command mode messages. The problem is, no AT command mode messages were sent and the XBEE should even be in AT command mode, as it just powered up (this all happens within 100ms of turning on power). Also, if I hold the ATMEGA chip in reset, then power on the XBEE I can see it start up in 38400 BAUD mode, as expected. Then if it turn on the ATMEGA they start talking to each other just fine. So obviously the micro is resetting the XBEE somehow but I cannot for the life of me see where or how.

I see no messages entering the XBEE before this and nothing else that could be causing it. Is there even a way of resetting an XBEEs settings without sending messages? It shouldn’t matter if the other pins are floating should it? Is there anything else I should be looking at or trying? I’ve tried to be as descriptive as possible and hopefully haven’t missed any detail but let me know if there’s anything more I could elaborate on. Any help would be appreciated.

The XBee product is a 3V device and is NOT 5V tolerant. From what I can find, the processor ATMEGA1284 is a 5V device. You need to use level shifters between the XBee and ATMEGA.

Most ATMEGA chips have an operating voltage range of 1.8-5.5V. We run all ours at 3.3V. I have also had both analog and digital probes on the 3V3, DIN and DOUT pins of the XBEE but haven’t seen any voltage spikes or other unexpected behaviour.

Try using a scope on the lines. That way you can see what exactly the processor is doing.