Why would you not want to use escaped mode API? It seems like frame synchronization would be harder if you got out of step. In escaped mode, every time you see an unescaped flag, it’s a flag. Your receive state machine can simply reset. Without escaped mode, when you see a flag it might be the start or it might not, you don’t know until you achieve initial synchronization.
I’m just curious why one would NOT want escaped mode, and why escaped mode wouldn’t be the default. Is this a legacy issue?
Easy - when one rarely gets out of sync, escaped mode is a waste of effort. All Digi gateways do not use escaped mode.
I would state it like this: If your co-processor and the Xbee are on the same PCB, and if your co-processor correctly uses RTS/CTS and is fast enough to keep up with expected traffic, then you should never get ‘out of sync’. Upon reboot you can use Xbee reset to force re-sync.
The ‘escaped mode’ is actually the legacy mode - it is ideal when as example you have a PC/host with 30 foot of RS-232 cable between you and the ‘Digi RF box’. Such systems could see some few % of frame errors just because of noise pickup or sutble grounding issues, so the use of the escaped API frame is critical to rapidly recover after the inevitable line errors.