A completed bus write does not mean the module is ready for the next timestamp command. Epson's RA4000CE and RA8000CE manual requires 5 ms between successive command triggers. It also describes checking acceptance and confirming the trigger register has returned to 0x00 before immediately reading a record or issuing another command. If the fixture reports successful writes but a timestamp is missing, check hardware edge spacing, register state and the buffer before blaming the oscillator or the bus.
Separate the start of a write, the trigger edge and the readable record
The manual first enables CMDTRGEN in WRCMD_CFG, then writes the WRCMD_TRG data field. That write initiates an action; the trigger byte read back is not the timestamp record. Epson's timing diagram marks the rising clock edge for the least significant bit of the data byte written to 0x42 as the trigger. A host function call, queue entry, final bus completion and callback can all occur at different points. Identify that data byte on the trace before comparing two hardware triggers.
To confirm acceptance, the manual describes checking BUF_INTF.BUF1F or observing a change in RDPAGE in BUF1_CFG2. Use evidence appropriate to the buffer configuration, previous flags and documented procedure. If a flag was already set before the write, finding it still set does not tie it to the new command. Distinguish old events using the supported method, and record states before and after the write. Do not clear unsaved records and status merely to simplify the test.
Return of WRCMD_TRG to 0x00 is the readiness check described for an immediate follow-up, not proof the application read and stored the new record. It also does not replace the interval between triggers. Keep command issue, acceptance evidence, trigger-register readiness and application storage separate. If a stage times out, record which one and switch to diagnosis. Rewriting the trigger address blindly can make old and new commands harder to distinguish.
Measure from the hardware edge, not sleep time between software loops
Suppose a logic analyzer identifies the rising edges for the low bits of two data writes to 0x42 at 12.4 ms and 16.9 ms. They are 4.5 ms apart, 0.5 ms short of the manual's 5 ms requirement. A software log claiming five milliseconds between requests, or a second completed bus write, does not make that sequence compliant. Save the relationship between bus edges and host timestamps so you can distinguish request queuing, host clock rounding and bus scheduling.
If a revised sequence puts the second edge at 18.0 ms or later, the interval is 5.6 ms from the first edge. That gives 0.6 ms of nominal margin on spacing alone. The register still needs to be ready, and the buffer must be able to retain a record. Do not extrapolate a system throughput limit from spacing: buffer capacity, external events using the same storage, bus read time and host scheduling all need their own accounting. Verify edge timing at the relevant conditions, then use host scheduling with documented margin.
Define what the timestamp represents as well. A host's function-call time and the command edge captured by the module are different events. If the intended event is a physical switch action but software queues the command, budget the queue latency separately. Finer timestamp resolution does not remove variable acquisition latency. A more accurate crystal by itself cannot solve that problem.
The same command path can clear state, so constrain production writes
The manual describes EVCNTCLREN for clearing event counters on a command trigger and BUF1FCLREN for acting on buffer status flags. If production software shares a command method between capture and cleanup, confirm the wrapper controls those actions explicitly. Routine timestamping should not inherit a previous reset configuration. A separate diagnostic script should not change those registers halfway through a test. Assign ownership for writes and save the configuration on entering and leaving the procedure.
Start the fixture test with a single command. Match the bus byte, status and resulting record. Then issue consecutive triggers at valid intervals and check which records remain under the selected buffer policy. Finally test representative concurrency to distinguish external events from command-generated records. If the buffer is already full, writing faster does not recover missing events. Interpret retained, overwritten or discarded records under the selected mode and mark gaps in the host log.
If production firmware cannot be changed, reproduce the issue with the same logic analyzer setup. Decode the write target and capture module state and the sequence IDs stored by the application. The report should let another engineer trace a sequence ID from host request to hardware edge to record, or see exactly where the evidence stops. Do not infer that all intermediate records exist from the first and last timestamps, or extrapolate a short idle test to a loaded system.
For purchasing or the contract assembler, record the complete module, firmware version, fixture settings and manual revision. If a substitute changes the bus interface, interpret the signals accordingly. Shared command behavior across two models does not make their wiring or software drivers interchangeable.
Check whether bulk initialization writes accidentally pass through the trigger address. For RA4000CE, the manual says successive register writes increment the address. The trigger timing diagram also shows that data for the next address can follow 0x42. If the driver writes a block in one transaction, inspect the whole address range rather than the start address alone. Replaying a register dump is not safe merely because most bytes hold configuration rather than actions.
For intermittent misses caused by timing variability, capture the shortest observed interval under several task loads instead of reporting only an average. Retain the scheduler settings and failing sequence IDs so the next test covers contention that compresses spacing, rather than just extending a static delay. The manual specifies command spacing, not the granularity of the operating system timer.
Command-trigger acceptance checklist
| Check | Evidence to retain | If evidence is missing |
|---|---|---|
| Trigger edge | Target register, rising edge for the low bit and spacing | Do not substitute host call time |
| Acceptance and readiness | Before-and-after flag or pointer and trigger field reset | Do not rely on a write result or an old flag |
| Buffer and cleanup | Buffer mode, command configuration and recorded sequence IDs | Preserve the state before changing settings |
| Production result | Host requests, bus edges and actual records matched | Do not count bus writes as captured timestamps |
FAQ
If the trigger register is already back to 0x00, can the next write go out early?
Not on that condition alone. Consecutive triggers still require 5 ms, and acceptance evidence and available storage also matter. Field reset, trigger spacing and record retention are separate checks.
Does a successful command test show that external events cannot be lost?
No. A software command has its own trigger path. External events also depend on pin conditions, trigger configuration and buffer use. Verify each individually and then test the concurrent cases the actual system can produce.
