For a 24 MHz crystal, the PI7C9X1172 datasheet gives a 38400 bit/s combination of divisor 25 and sample rate 25. With prescale 1, their product is 625; 24 MHz divided by 625 gives the target. Copying only the divisor and leaving the sampling rate at 16 yields 60000 bit/s. A crystal is not normally the explanation for that difference. Verify all three settings and the actual transmitted bit time before replacing the reference.
Baud rate requires more than a single divider
The PI7C9X1172 is a dual UART bridge. It can use an external crystal or a suitable external clock; it is not an independent crystal oscillator. The published generator formula divides XTAL1 frequency by the prescaler, divisor and sample rate. MCR[7] selects prescale 1 at zero, the reset default, or prescale 4 at one. DLH and DLL form the divisor. They do not store the resulting sample rate.
Table 8 mentions “16x” in the divisor heading, but has a separate Sample Rate column and gives 25 for this entry. Do not substitute a heading for the row's separate parameter. Check the two numbers against the equation. Zero nominal error in the table denotes an exact divider result for the nominal input. Actual crystal tolerance, measurement conditions and receiver margin remain separate.
| Nominal input and prescaler | Divisor × sample rate | Nominal result |
|---|---|---|
| 24 MHz, ÷1 | 25 × 25 | 38400 bit/s, Table 8 |
| 24 MHz, ÷1 | 25 × 16 | 60000 bit/s, hypothetical missed sampling setting |
| 24 MHz, ÷4 | 25 × 25 | 9600 bit/s, hypothetical prescaler change |
| 1.8432 MHz, ÷1 | 3 × 16 | 38400 bit/s, Table 5 |
Use bit width to classify the problem
Nominal bit times are about 26.04 µs at 38400, 16.67 µs at 60000 and 104.17 µs at 9600. If the transmitter consistently measures near one of those values, use it to reconcile the configuration before changing the crystal load. The three examples are investigation leads. A 9600 result alone does not prove that software set MCR[7]; another set of operating parameters can produce the same total ratio. The equation tells you the overall division but does not uniquely identify each factor. Read back the actual channel and configuration.
In an approved test window, transmit an identifiable, nonproduction pattern with successive bit transitions. Measure several bit widths at the transmitter rather than interpreting an entire character or interbyte gap as one bit. Repeat at the actual receiving point, documenting the probe location, reference and interface levels. If the transmitter's timing is right but decoding fails, check frame format, transceiver, wiring and peer settings. If both points show a stable but incorrect bit width, return to the generator configuration and the selected reference.
Table 5 reaches 38400 using a 1.8432 MHz crystal, divisor 3 and 16× sampling. A legacy product with two board revisions and one shared parameter file can therefore target the same baud without using the same register values. Identify the populated reference and organize the configuration by board revision. A printed target in a startup log does not identify the board or guarantee the bit width.
Verify the UART channel and register access conditions
The bridge has two UART channels. Correct behavior on one does not establish that the other received the same settings. Record the actual failing channel, the startup configuration and the state left by the driver after reboot. DLH and DLL are the high and low divisor bytes. Both at zero produce no baud clock; that is not a method of inheriting the previous divisor. Observe the documented access conditions for reads and writes. A value from an overlapping register address is not useful evidence if the active bank is unknown.
The datasheet defines the sample rate as 16 − SCR + CPRN. Do not write decimal 25 to an arbitrary similarly named register. Check field access and encoding against both the register description and the actual driver; record the effective sampling rate, raw write and access conditions separately. This worked example does not infer a universal register sequence from one table entry. If software opens access to extended registers, capture when it enters and exits that access state so that a valid debug transaction does not leave normal software reading an unintended register.
Sign off the calculation and the link separately
Use the published zero nominal error combination as a paper check, then derive the expected rate for the actual reference if measurable. If the result differs from the measured bit width, distinguish source tolerance, divider settings and measurement method. At the required operating conditions, verify transmission and reception separately with unchanged peer settings. If reliable direct reference measurement is unavailable, do not load a small-signal crystal node with a heavy probe. Use an approved noninvasive test or cross-check from documented output timing, and record the limitation.
Keep the revision, source and frequency, prescaler, divisor, sample rate, UART channel, bit width and peer test result. Record initial startup and reset recovery separately so that a later driver reset does not silently restore generic defaults. Offline configuration tests can cover missed sampling changes, the wrong prescaler and a zero divisor without assigning every failure to a generic “no serial data” report. Sign off bit intervals within characters rather than application-message periodicity.
On a bench unit, it can help to compare two approved configurations on the same hardware. Load the known combination and retain a trace and register readback. Then change only the approved software variable, compare the resulting bit time with the equation and restore the normal value. Use a sample or offline replay rather than transmitting deliberately malformed traffic on production equipment. If a protocol requires a fixed rate, keep the test receiver isolated from any system that could interpret test traffic as live commands. One changed factor also exposes any unrelated firmware task that overwrites the setting.
Distinguish persistent bit-width error from intermittent corruption. If bit widths are consistent and only particular characters fail, check stop bits, electrical levels and transceiver behavior before changing sample rate again. Save waveforms before and after any isolator or level translator and document the analysis threshold. A decoder's auto-detected rate is not proof of the configured hardware rate. Keep raw configuration and effective settings in firmware records, and measurement conditions and probe locations in repair records. Match board revisions before combining their evidence.
FAQ
Does zero error in the table make a hardware measurement unnecessary?
No. It is nominal arithmetic for the listed reference and factors. Frequency tolerance, an unapplied setting, signal translation and receiver margin still matter. Preserve a bit-width capture and a link test.
Can I pass divisor 25 to any driver to configure 38400?
No. It is one parameter for this part at a specified reference, prescale and sampling rate. Some drivers accept a target baud rather than a physical divisor and may choose different sampling. Check actual settings and transmitted bit width.
