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

The KDS DST210AC Is Working. Why Does Writing TUN on a PIC16F18145 Not Change Frequency?

Check ACTEN first. A 32.768 kHz KDS DST210AC can serve as the low-frequency reference in this board design. Microchip specifies that when Active Clock Tuning is enabled, the module uses SOSC to measure HFINTOSC and controls the TUN field in hardware. TUN is then read-only to application software, and writes are ignored. This result does not show that the external crystal has failed.

Decide which method owns the tuning field

Suppose a repair utility used to write TUN in manual mode and check the internal clock. A firmware update now enables Active Clock Tuning, and the same command no longer changes the frequency. Record ACTEN, the actual clock source, TUN and the measured rate. For an automatic calibration design, verify that the SOSC reference is running and observe the internal clock behavior instead of using a software write as proof of tuning. If the design requires manual adjustment, disable ACT as specified before writing TUN, then measure the internal clock path that the application actually uses. Do not have a maintenance script compete with active hardware control.

Record the external reference and internal clock separately

Verify the 32.768 kHz reference and the high-frequency internal clock as separate signals. There is no need to remove a working crystal to demonstrate that a register write is ignored. Compare automatic and manual operation on the same board, supply and reference, taking account of whether the application can tolerate a change in calibration mode. If manual adjustment works and software writes cease to take effect when ACT is enabled, that matches Microchip's documented behavior. If automatic calibration does not behave as expected, investigate the reference, initialization and measurement point before judging the crystal lot. Crystal startup and load acceptance remain independent checks.

Related selection guide: MERLIN Crystal Timing: Choosing a 32.768 kHz Crystal, Oscillator or RTC Module by Backup Current and Temperature Accuracy

Resource link: https://www.mecxtal.com.cn/en/guides/rtc-timekeeping.html

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.