Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

Pericom PI7C9X1172 crystal UART: Can DLL and DLH be written during sleep?

Do not write the baud divisor while the UART is asleep. The PI7C9X1172 datasheet says sleep stops the UART clock and that DLL and DLH must not be written in that state. It advises disabling sleep using IER[4] first. A running external crystal and a logged host write do not establish that the internal baud generator accepted new settings. Verify the operational state, effective divisor and transmitted bit width.

The crystal and the internal UART clock can be in different states

The PI7C9X1172 is a dual UART bridge. An external crystal or clock provides its reference, but the UART has its own sleep management. The manufacturer describes EFR[4] for enhanced functions and IER[4] for enabling sleep, plus the conditions for entry: idle RX, an empty TX FIFO and shift register, and no pending interrupt apart from THR. Data in the RX FIFO prevents entry. Permission to sleep does not prove the UART was already asleep before a transaction.

Sleep stops the clock to the UART, on which many registers depend. That does not mean the crystal terminals necessarily stop, and activity at the upstream reference does not prove the UART domain is clocked. If a baud change works under traffic but fails after an idle period, include FIFOs, pending interrupts and sleep enable in the investigation. Those trials may not involve the same hardware state.

StageCheckWhat it does not establish
Sleep function enabledActual EFR[4] and IER[4]UART already asleep
Entry conditionsIdle RX, empty transmitter, no other interrupt and empty RX FIFOInternal state from crystal activity alone
Before divisor writesDisable sleep and establish valid accessA host request has taken effect
After divisor writesRead back intended channel and measure bit widthFull acceptance from a single application response

Separate wake mechanisms from a safe baud change

Changes on RX or modem inputs, or writing data into the TX FIFO, can wake the UART. That does not make an arbitrary character a good way to prepare a production baud change. It could transmit at the previous rate or be received as unintended traffic. A transaction may also occur before the internal state is verified. Follow the approved use of IER[4] to disable sleep and the documented procedure to reach DLL and DLH. Do not assume a wake latency that the quoted section does not establish; verify access and output for the implementation.

Suppose legacy firmware changes baud after idle and immediately sends a first frame. If the write occurred during UART sleep, the sequence violates the documented condition. The same firmware may work on a continuously busy bench because the transmitter prevents sleep entry. Compare on the same board and reference, changing only the allowed sleep and idle sequence. Retain control settings, intended divisor and peer configuration. Do not qualify an idle path from a traffic-only test.

Tie each write to a real transmitted frame

Record the target UART and the relevant control state before changing speed. Follow the datasheet access conditions for the divisor bytes, write and read them back, then restore normal register access. Include the effective register context in the bus record rather than summarizing every transaction as “serial write succeeded.” A different register at an overlapping offset may accept a bus write without changing the divisor. If evidence disagrees, do not send business data based solely on a successful API result.

Transmit a known safe test pattern during an approved window. Measure individual bits at the transmitter and compare with the actual receiver node. A configuration value shown by a monitoring tool is distinct from measured bit width. Before restoring sleep policy, verify the relevant early and later frames. If the first frame fails and subsequent frames pass, record that order; later success is not a substitute for first-frame evidence.

Treat the two channels independently. A passing UART A trace cannot validate UART B. If a legacy system also negotiates the rate with its peer, record peer switching as a separate concern. Otherwise a correct local change may look like sleep-related failure if the peer is still listening at the old rate. This article addresses the prerequisite for modifying a divisor, not a universal negotiation protocol.

Regress real sleep, not only absence of application traffic

Keep evidence of permitted sleep and entry conditions, the disable-and-write transaction, and the new bit width and receiver outcome. No recent application message does not establish sleep: buffered data, pending interrupts or input changes may prevent or end it. If direct state observation is unavailable, label the inference and use a controlled comparison.

After startup or low-power changes, retest a genuinely idle case, unread receive data, incoming activity and changing speed from idle. Do not discard production data merely to force sleep; use a bench unit or replay where appropriate. Distinguish hardware entry and exit from an application label. If reverting firmware changes the result, keep the actual write sequence and bit widths to identify which change matters.

For a repair with limited internal visibility, document when sleep was disabled, when verified register access occurred and which frame first demonstrated the new rate. Do not turn an unmeasured wake time into a promise. Keep this full sequence for comparison across board revisions.

Use a known stable revision as a control when several drivers are involved. Save initial serial settings, restore them after the test and record whether sleep was explicitly re-enabled. Measure power separately if it is an acceptance requirement; crystal activity cannot substitute. Synchronize register and transmission captures to distinguish a wake-before-write sequence from traffic sent first. Printed log order is not evidence of physical event order.

FAQ

If my DLL and DLH writes were acknowledged, did the next frame use the new rate?

That remains unverified. Establish that the write did not occur in sleep, then check the correct channel, actual divisor and transmitted bit time. A host transaction can complete without proving the intended operating result.

Why check sleep when the crystal signal looks stable?

The reference and internal UART clock are different layers. The datasheet says UART sleep stops its internal clock. A running crystal does not replace the sleep and access checks before changing baud.

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.