Trace a FIFO Watermark Wake and Delayed Read
Trace a FIFO Watermark Wake and Delayed Read
What happens before the host can read?
Accelerometer FIFOSampling while asleep
| Track | Before sample arrival |
|---|---|
| Sample arrivals | Sensor running |
| FIFO occupancy | Empty · below watermark |
| Mapped interrupt pin | Inactive |
| MCU sleep and wake | Asleep |
| Bus transactions | Idle |
Fill below the watermark
| Track | Earlier | Now |
|---|---|---|
| Sample arrivals | A arrives | B arrives |
| FIFO occupancy | A stored | A, B · below watermark |
| Mapped interrupt pin | Inactive | Inactive |
| MCU sleep and wake | Asleep | Asleep |
| Bus transactions | Idle | Idle |
Letter tags are animation aids. Use independent timing or stimulus evidence on the bench.
Assert the mapped pin
| Track | Before | At watermark |
|---|---|---|
| Sample arrivals | A and B arrived | C arrives |
| FIFO occupancy | Below watermark | At watermark |
| Mapped interrupt pin | Inactive | Asserted |
| MCU sleep and wake | Asleep | Waking |
| Bus transactions | Idle | Idle |
Letter tags are animation aids. Use independent timing or stimulus evidence on the bench.
Reaching the watermark signals that a batch is ready.Allow for wake latency
| Track | Pin assertion | Wake latency | MCU awake |
|---|---|---|---|
| Sample arrivals | C | D arrives | Capturing continues |
| FIFO occupancy | At watermark | Beyond watermark | Awaiting read |
| Mapped interrupt pin | Asserted | Asserted | Asserted |
| MCU sleep and wake | Waking | Waking | Awake |
| Bus transactions | Idle | Idle | First read pending |
Letter tags are animation aids. Use independent timing or stimulus evidence on the bench.
The MCU takes time to wake, and samples can keep arriving before the read starts.Read the FIFO oldest first
| Track | First read | Successive read | New arrival |
|---|---|---|---|
| Sample arrivals | Earlier samples stored | Sampling continues | E arrives |
| FIFO occupancy | A removed | B removed | E joins newest end |
| Mapped interrupt pin | Capture pin trace | Follow occupancy | Check pin state |
| MCU sleep and wake | Awake | Awake | Awake |
| Bus transactions | XYZ burst for A | XYZ burst for B | Read INT_SOURCE during service |
Read sample A
One six-byte XYZ burst
DATAX0DATAX1DATAY0DATAY1DATAZ0DATAZ1A moves from the oldest end to the host.
Read sample B
One six-byte XYZ burst
DATAX0DATAX1DATAY0DATAY1DATAZ0DATAZ1B moves from the oldest end to the host.
Letter tags are animation aids. Use independent timing or stimulus evidence on the bench.
Read each XYZ sample in one six-byte burst, oldest first. Measure the pin and read INT_SOURCE as part of service.Verify the wake route before sleeping
| Track | After the planned bursts | Before sleep |
|---|---|---|
| Sample arrivals | Sampling continues | Sampling continues |
| FIFO occupancy | Measure remaining occupancy | Check against watermark |
| Mapped interrupt pin | Capture pin behavior | Verify expected level |
| MCU sleep and wake | Awake during checks | Sleep after wake route verified |
| Bus transactions | Record INT_SOURCE readback | End bus activity |
Pin trace
Check when the physical interrupt pin asserted and whether it deasserted.
INT_SOURCE readback
Check the chosen source against measured occupancy. For watermark, check whether occupancy is still at or above the configured level.
Next wake
Verify that the route can service the next wake before sleeping.
Test delayed service at capacity
| Track | Watermark crossed | Service delayed | Freeze at next arrival |
|---|---|---|---|
| Sample arrivals | Batch ready | New samples arrive | New sample arrives |
| FIFO occupancy | At watermark | Filling | 32 stored samples |
| Mapped interrupt pin | Asserted | Asserted | Asserted |
| MCU sleep and wake | Wake signaled | Read still delayed | Read still pending |
| Bus transactions | No read yet | No space freed | Compare retention modes below |
FIFO_MODE[7:6] = 01 in binary · FIFO mode. Other fields depend on configuration.FIFO at capacity
Preserves stored samples and stops collecting additional ones.
Stream at capacity
Replaces the oldest stored sample with a new arrival.
| Evidence | Compare at the delayed-service interval |
|---|---|
| Retained XYZ reads | Identify what was read out after the delay. |
| Independent stimulus or measured sample timing | Establish which samples were expected. Claim loss when this evidence shows missing samples. |
Letter tags are animation aids. Use independent timing or stimulus evidence on the bench.
At capacity, use the FIFO mode readback and independent stimulus or timing evidence to tell which samples were retained.In this configuration the sensor keeps sampling while the MCU sleeps.
Technical boundaries. The ADXL345 example assumes FIFO mode with the watermark routed to a wake-capable MCU pin. The timeline and spacing for queue occupancy are schematic. Sample letters are animation aids. Bench evidence of which samples were expected comes from independent stimulus or timing measurements.