Your question is Noisy Protocol Packet Parsing. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
Tell me about how you parse packets from a noisy serial stream and recover from malformed or out-of-order data in an RTOS-based system.
Explain the framing format, buffering strategy, validation order, and synchronization between interrupt or DMA handling and the parser task. Cover how you bound memory and CPU use, handle sequence numbers, detect duplicates or stale packets, and verify the implementation against corruption, truncation, injection, and sustained garbage input.