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

AFE4404 is back at 100 Hz. Why do its internal timing windows still need recalculation?

An optical sensor board runs its AFE4404 at 100 measurement groups per second. An engineer changes CLKDIV_PRF and adjusts the period register until ADC_RDY is back at 100 Hz. The group interval is correct, yet the light and dark phases look different. ADC_RDY marks the recurring cycle. LED activation, sampling, reset and conversion have their own count windows inside it. Restoring one period does not restore those windows.

Separate reference, conversion and timing-engine clocks

TI's clock diagram distinguishes CLK_EXT, CLK_ADC and CLK_TE. With an external source, choose a supported first divider to keep the conversion clock between 4 and 6 MHz. CLKDIV_PRF further divides it for the timing engine. Suppose an 8 MHz oscillator divided by two yields 4 MHz CLK_ADC. With CLKDIV_PRF at 1, CLK_TE is 4 MHz and one count represents 0.25 µs. At divide-by-eight, CLK_TE is 500 kHz and one count represents 2 µs. Both the external source and conversion clock stay fixed while timing-engine granularity changes eightfold.

The target 100 Hz takes 10 ms per cycle. The two settings need 40,000 and 5,000 counts respectively. Following TI's zero-based period example, PRPCT is 39,999 or 4,999. Verify the valid PRF range and the maximum associated with the divider. The examples fit, but a greater divider can have a lower allowable maximum. An arithmetic period is only one requirement.

Which old fields have to change?

An LED interval from count 0 through 399 lasts 400 counts. At 4 MHz it is 100 µs. At 500 kHz the same values give 800 µs. Use 0 through 49 to keep 100 µs. A 1.75 µs window was seven counts at 4 MHz. At 500 kHz its nearest nonzero width is 2 µs. Depending on whether a boundary is a minimum reset, a latest shutoff, or a gap, rounding direction can matter. Dividing every value by eight and rounding each independently can violate the sequence.

Rebuild each window as start, end, and duration in microseconds. TI's example includes both endpoints, so subtract start from end and add one count. Record which intervals can overlap and which must be separate. Conversion can run out of time between adjacent windows even with room elsewhere in the cycle. If ADC averaging changes, apply the documented conversion timing for that clock. Change one variable at a time during comparison so averaging and timing-divider effects remain attributable.

Put optical and digital observations on one timeline

Use a stable optical bench target. Capture an LED current indicator, ADC_RDY and received frame sequence together. Read back timing fields and measure LED widths, order and duty cycle. Establish that the configured sample window falls on a settled illumination level using a suitable test point. Avoid loading the sensitive photodiode input with a probe. Repairing only ADC_RDY can leave an LED on eight times as long. Check power and the returned code for every phase independently.

Keep the clock tree and a timing table with both counts and microseconds. Retain the corresponding optical bench results. If two external reference frequencies can produce the same downstream clocks, still verify input swing, waveform and sequencing. Specify the external clock interface when selecting the oscillator. Qualify the application by verifying the complete timing windows at that input.

Convert the measured LED intervals into duty cycle for the power budget. One 100 µs pulse per 10 ms is 1%. A misconfigured 800 µs interval yields 8% even if ADC_RDY still arrives every 10 ms. Keep per-LED timing so sequential and simultaneous pulses are attributed correctly. Recheck whether peaks from different phases coincide and affect supply sizing.

References

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.