The byte alone cannot tell. In memory-mapped mode, bit 7 of the Special Function Register selects what appears at UART base plus 0x16. At zero, it selects the Sample Clock Register: code zero means a sample-clock value of 16. At one, it selects the read-only transmit FIFO data count: zero is a zero count at that observation. Identify the object before replacing the reference crystal or changing sampling parameters.
Confirm the mapping and channel first
The manual distinguishes the conventional register mode from the memory-mapped layout discussed here. Each UART channel has its own memory block. Equal offsets do not mean the channels share one sampling state. Record the channel, base and offset; a screen showing “read 16” might not identify the map or even the number base.
| Memory-mapped condition | Object at base + 0x16 | Meaning of a zero |
|---|---|---|
| SFR bit 7 is zero | Sample Clock Register | Sample-clock value 16, not stopped |
| SFR bit 7 is one | Transmit FIFO data count | Zero entries in this observation |
| Selector not captured | Object not established | Do not interpret it |
| Selector came from another channel | Incomplete evidence for this access | Check which channel was addressed |
The selector is in the same UART channel's SFR at offset 0x07. It does not come back as a tag in the 0x16 byte. Read the detailed entries as well as the shared address table: the transmit-count view is read-only; the sample-clock code lives in the low writable bits of the other view. The summary does not make both objects writable at all times.
The same byte can report two different quantities
The sample-clock field uses the low four bits. Code zero maps to 16, and code 0x0C maps to four. The result is a factor used by the baud-rate generator, not a measurement of the physical reference or serial rate. In the transmit-count view, 0x0C instead means twelve entries. It cannot be inserted into the sampling formula.
A FIFO count can happen to look like a valid sample code. Another might look like an invalid code and be mistaken for damage or lost initialization. Identify the object before decoding the field. Keep the full count byte and transaction context for FIFO observations; decode only the specified bits for the sample-clock setting.
Prevent diagnostics and transfers from selecting different views
One driver path may read the transmit queue while configuration or diagnostics read the sampling factor. If both can change the selector, a second path can switch views between the first path's selection and its read. Centralize those accesses or otherwise keep selection and the dependent read together. Define who can change the view so diagnostic work does not create its own misleading results.
For a read-only investigation, use the established path to inspect the selector first. If a controlled experiment is necessary, use an isolated bench or approved service window. Produce a meaningful count with test traffic, not by flushing a production port. If both returned bytes are zero, use a defined transmit condition or verify a known sample setting where allowed. Record the original view and restore it. Do not identify a field by writing to an uncertain address on live equipment.
Match each register result to the right functional evidence
First verify the memory map, channel and selector. Then verify the sample configuration. To check baud rate, also document the applicable divisor and prescaler and measure a known character's bit intervals. If the issue is the transmit queue, trace how the count changes with test traffic. A zero FIFO count does not prove the serial output is already idle: a character can have left the queue while transmission is still in progress.
Label raw numbers in the report, for example: “UART1, memory-mapped, SFR[7]=0, offset 0x16 returned 0x00, sample-clock value 16.” Record the reference and actual serial timing separately. A valid sample setting does not qualify the entire clock chain. A mislabeled register read is not evidence of crystal drift.
For a firmware change, use a separate regression to read the known sample setting, then exercise the count view with controlled test transfers. Verify the live channel from the access log, not just the selected tool tab. Keep the two functional results separate.
A test tool can enforce provenance: do not feed a sample reading into a baud-rate calculation unless its selector is known, and do not decode a FIFO count as a sample code. If both logs show zero, keep their time and meaning separate. Mark an old capture with no selector as “object unknown” rather than borrowing another channel's or later access's state.
FAQ
Does a read of 0x0C prove the sample-clock value is four?
Only when SFR bit 7 is zero. When it is one, the byte instead represents a transmit count of twelve. Use evidence from the same access or its controlled transaction context.
Can I change sampling while the transmit-count view is selected?
No. The detailed table defines the count as read-only. Before making a baud-related change in an approved test or maintenance context, verify the sample-clock view and the applicable register-access conditions.
