Skip to content

Firmware Fundamentals — question 5 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.

CTRL_REG is a memory-mapped 8-bit register; bits 5-7 are reserved and should be left at their current value.

An 8-bit peripheral control register has bit 4 as an 'enable' bit; bits 0-2 hold a baud-rate selection and bit 3 holds a parity setting that were already configured correctly by earlier code. A teammate adds this line to turn the peripheral on: `CTRL_REG = (1 << 4);` After that line runs, the peripheral enables, but the baud rate and parity settings that were working a moment ago are now wrong. What went wrong, and what's the corrected line?

How sure are you?

Being confidently wrong costs more mastery than admitting a guess — that is deliberate, and it is how misconceptions get found.

Neither is graded, and nothing here is recorded.