Firmware Fundamentals — question 9 of 10
Write a real answer. It is graded against the question's rubric, and the mastery movement is computed by the same engine the product uses. Scoring here is deterministic rather than model-written, so this page costs nothing to run and nothing is saved. In a track built from your own posting, the same rubric is graded by the model, which is what produces feedback about your reasoning rather than about coverage.
You have a handshake where an ISR sets a boolean `new_data_ready` flag when an event occurs, and the main loop does: `if (new_data_ready) { process(); new_data_ready = false; }`. Under sustained high interrupt rate, roughly once every few minutes a data sample is silently dropped - not corrupted, just missing, as if an event fired but was never processed. Walk me through the exact race that causes this, and how you'd redesign the handshake so no event is ever lost, even at high rates.