Lost data when de-asserting RTS during receive

I’m using the Xbee-PRO S2C module as a Zigbee radio for an embedded device (over UART using the transparent mode) and am having an issue with the serial interface.

If I de-assert RTS while a receive operation is in progress, the RX line from the S2C is quickly pulled high and data transmission is halted; however when asserting RTS again (once buffers have been shuffled or processed), the data stream resumes but seems to have skipped 5 or 6 bytes.

I did see in the S2C documentation: “If the device sends data out the UART when RTS is de-asserted (set high) the device could send up to five characters out the UART port after RTS is de-asserted.”

By this description I would expect the TX line to continue to output data after RTS is de-asserted for up to 5 bytes. This is a headache and eliminates some optimal power scenarios with a full peripheral solution, but if I asynchronously de-assert RTS before I stop the UART from writing data over DMA on my micro, I could get close. What I’m finding though is that instead of trickling out over the TX line after the de-assert, it looks like those extra bytes are just being dumped.

In the image below, the data being transmitted is a sequence of incrementing bytes. 0x37, 0x38, 0x39, 0x3A, and 0x3B are all never received by the listening microcontroller. If RTS is not de-asserted in the middle of the transmission, the message is correctly formed.

(looks like I can’t embed images, but screenshot of problem hosted at the link above)

To verify it isn’t the microcontroller slamming its RX line shut, this issue is reproducible even if the S2C TX line is completely disconnected from the microcontroller RX and only being read by the logic analyzer. Tested with 405F and 4055 firmware without change.

Any ideas what’s going on behind the scenes, or any clever ways I could work around this?


How fast are you streaming the data into the radio?