flush() now gracefully steps down from RX mode and re-establishes RX mode afterward if a write occurred while PRIM_RX was active.