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

Why an EEPROM can temporarily NACK after a write on a 24 MHz board

An AT24C64D stores calibration coefficients on a controller board with a 24 MHz active oscillator. The analyzer shows acknowledgments for the device address, word address and data. A read issued immediately afterward sometimes gets no address ACK, but a later retry works. Measure from the write's Stop condition to the next Start. This EEPROM still has an internal write cycle after receiving the bytes. The old and new acknowledge bits prove different stages.

Confirm the physical end of the write

Microchip specifies that the Stop condition starts the internally timed write cycle. An acknowledge during byte transmission establishes receipt at the interface. An empty transmit queue or a completion callback for the last byte does not prove nonvolatile programming is complete. Capture the actual Stop and correlate it with the host's timing record.

The device does not acknowledge even a valid address while its write cycle is active. The manufacturer describes acknowledge polling with a Start and a valid device address byte with write direction after the original Stop. Once it acknowledges, a new read or write can proceed. Verify data separately by reading it back. An API taking a seven-bit address usually adds the direction itself. Supplying an address byte that already contains direction can create a persistent NACK even when the device is idle.

Account for bus and internal time separately

Assume the controller's actual I²C rate referenced to a 24 MHz active oscillator is 400 kHz. A 16-byte write within one page includes one device address byte, two word address bytes and 16 data bytes. Eight bits plus acknowledge per byte gives 171 clocks, or about 427.5 µs before line delimiters and pauses. The specified maximum write cycle is 5 ms. That dwarfs the time to shift the test data. A faster SCL does not rescale the internal write specification.

With a verified 24 MHz timer, 5 ms is 120,000 nominal counts. Use that conversion to compare with an external timebase. An application deadline also has to cover polling schedule, bus availability and clock error. Microchip defines the write-cycle observation from the initiating Stop to the Start of the first device-address request that will receive an ACK. Save the first unsuccessful request and the first acknowledged one. Report the interval seen on the wire separately from when firmware registered completion.

Test page boundaries and write protection independently

Check the page boundary first. This part has 32-byte pages. Write 16 known bytes inside one page as a control, then test the product's segmentation near a boundary. A single write that exceeds the end of a page wraps within that page and can overwrite earlier bytes. For a failed readback, check segmentation and the physical addresses that changed. A polling ACK means the device is ready. It does not correct an address error.

Include the normal write-protect condition. If the device quickly acknowledges but data never changes, check the write-protect pin at the relevant Stop and distinguish a protected operation from an address problem. Use an allowed test region with known prior contents. After checking power, addressing and pull-ups, determine whether NACK appears only after a valid write or also during idle identification. Those observations point to different failure paths.

Start with a controlled polling schedule, then restore the production interval. Polling once per millisecond can discover completion after the EEPROM actually finished. Timestamped requests show when the host observed ACK, not the unseen instant the memory finished programming. Shorter intervals can tighten that observation when the bus permits. Check throughput of the other shared peripherals as well.

Alternate identifiable patterns during repeat testing. Confirm the old pattern before writing the next one, then check the target and nearby addresses after acknowledge. Identical old and new values cannot prove a new write occurred. Changes to neighboring bytes call for checking page boundaries and segmentation. Keep the test data away from the production calibration region and record the write-protect setting with each result.

Keep the 24 MHz active oscillator specification, measured SCL, Start and Stop events, poll result and verified readback together. If other peripherals share the bus, exercise the normal bus schedule without allowing a polling loop to consume every available slot. Product acceptance requires valid stored data after the write completes. A successful initial transfer only starts that sequence.

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.