Board bring-up

All zeros is a protocol signature, not a dead chip

Five traps from bringing up a two-chip optical module over I2C from an RK3588 — one where the read command was silently malformed, one where a register value meant the opposite of what we assumed, and three that are cheaper to avoid than to debug. Every conclusion here was verified on hardware, and the one place where we were wrong for two weeks is included.

The single rule this page exists to deliver — a bus that does not answer NACKs. A bus that answers and returns all zeros for its entire register map is telling you your read path is wrong. Those two failures look identical in a log and have nothing in common.

The case

A colour cast on a subset of units, and a log full of zeros

An RK3588 host driving an optical module over I2C at address 0x1b on one bus: a display controller paired with an LED driver that owns the three current channels. Between the SoC and the module sits an FPGA that has historically owned that bus. On a few production units one colour channel was visibly dim, producing a yellow white field.

The first diagnostic log came back with every register reading 0x00000000. The conclusion drawn from it — that the modules were faulty, or that initialisation had failed — was wrong twice over, and knowing why is the whole point of the page.

Trap 1

The read command had two stages and we sent one

The vendor's protocol describes a read as a pair of transfers, not a single one. A write-side transfer selects the sub-address that means "read a register" and carries the register number; only then does a read-side transfer return the data.

As specified

Two transfers

Read part 1 (to 0x36):

0x36 | 0x15 | register

Read part 2 (from 0x37):

0x37 | 32-bit data

The 0x15 sub-address is what declares "this is a register read".

As shipped

One transfer, no sub-address

w1@0x1b 0x03 r4

Register number sent directly, no sub-address. The device acknowledged every time — and returned zeros every time.

Correct form:

w2@0x1b 0x15 0x03 r4

Nothing in the failure looked like a protocol error. No NACK, no bus timeout, no arbitration loss. The device politely returned four bytes. That is precisely why the mistake survived a full debug cycle: every mechanism we normally use to detect a bad transaction reported success.

The cascade

One malformed read produced four confident wrong conclusions

This is worth reading as a table, because each row is a conclusion a reasonable engineer would draw from the evidence available at the time.

What the tool reportedWhat we concludedWhat was actually true
Device ID = 0x00 (documented legal set 0xA0 / 0xA2 / 0xA6)"The chip on these boards is not the part we ordered"The ID was never read. The read path was wrong; the parts were correct.
All three current channels = 0"The nine configuration writes are failing — 0 of 9 accepted"The writes were fine. Only the verification reads were broken, so nothing could ever appear accepted.
Status poll on 0x3A always 0, bit 0 clear"Propagation completed successfully"The poll was reading a constant zero. A success flag that can never be false is not a check.
Every companion-driver register = 0"The LED driver is unresponsive or unpopulated"The companion driver was healthy. Same malformed read, second device.

The honest consequence. That log could not prove the boards were faulty, and it could not prove initialisation had failed either — because the measurement instrument was broken, not the thing being measured. A log that cannot be trusted in either direction is worse than no log: it consumes the credibility of a real defect and delays finding it.

Trap 2

The register value meant the opposite of what we assumed

After the read path was fixed, a second defect surfaced underneath it: the tool had been writing 4 into all three current registers and calling that "full brightness".

What we assumed

11-bit PWM duty

We read the controller's brightness register section, which describes an 11-bit field where 0x000 means 100% and larger values dim the output. So 4 looked like "essentially full brightness". Consistent, plausible, and about the wrong device.

What it is

10-bit IDAC current code

The same value written to a different chip's register is a current code on the LED driver, where larger means brighter. 4 is not near-full brightness; it is 23 mA, with a ±14 mA tolerance.

CodeCurrentWhat the value is for
00 mAChannel off
423 mA ±14 mAA test point. Relative error around 60%. Not a working point — but it is what our tool shipped as "full".
256272 mAThe datasheet's own calibration point
800809 mAThe value our reference FPGA design actually writes to the red channel
10001007 mAThe reference value for green and blue
10231030 mAFull scale

Why the symptoms matched so well

SymptomMechanism at 23 mA
White field looks yellowThree channels at 23 mA each, with ±14 mA of relative error, means the current ratio between channels is uncontrolled rather than the absolute brightness being low.
Red shows horizontal bandingAt a small fraction of nominal current the boost stage enters a pulse-skipping regime and the output ripple becomes visible in the picture.
Green and blue look "fine"A single colour at the wrong amplitude still reads as that colour to the eye. Only the ratio across channels produces a visible fault, which is why single-colour tests pass and the white field fails.

The generalisation: before writing a number into a register, find the table that maps code to a physical unit, and read the tolerance column before the value column. A tolerance that is large relative to the value is the document telling you this is a verification point, not an operating point.

Traps 3–5

Three more that cost days, for cheaper reasons

Trap 3

Two masters on one bus

An FPGA had historically owned this I2C bus. While it still held it, every transaction from the SoC NACKed — which we initially read as a dead module. Two masters driving one bus is not a mergeable situation; it is a bus that fails and then works. Get the other master released, in writing, and then verify the release before blaming the bus.

Trap 4

A register existing is not a reason to write it

A front-end reset register was in the sequence because it was in the sequence. The datasheet says plainly that it has no required application; sending it resets the pixel-clock domain and the picture never returns. Read what the document says about not writing a register, not only about writing it.

Trap 5

Restoring a path needs the whole path

Leaving the internal test-pattern mode required clearing one register, which was not enough: the pattern number, the resolution register and the format register all stayed on the test configuration, so external video never locked. Exiting a special mode means restoring every register the mode changed, in the right order.

Method

The two instruments that actually found it

Neither of these is clever. Both are cheap, and both would have ended the debug in the first hour.

InstrumentWhat it doesWhy it works
A/B read diagnosticReads the same register twice, once with the suspected-correct command and once with the old one, and prints bothConverts an invisible protocol difference into a visible one. If both return the same value the command was never the problem; if they differ, the argument is over.
Known-answer test on the device IDChecks the ID against the documented legal set before any measurement is printedMakes the tool refuse to render a broken read as a physical quantity. This is the check that stops a zero from being displayed as "1085 mA, normal".
Good-versus-bad register dumpFull dump from a known-good unit and from a suspect unit, then a diffTurns "some units are dim" into a list of registers that differ. It also distinguishes a real hardware difference from a formatting difference in the dump.
Internal test patternsDrive the module's own generated patterns, bypassing the external video input entirelySplits the problem in two: a fault that follows the pattern is in the module's optical path; a fault that only affects external video is upstream of the module.

Sequence matters. Run the A/B read and the known-answer test first, before measuring anything. We ran them last, after a week of conclusions built on top of a broken read path — and every one of those conclusions had to be withdrawn.

Honest boundary

What this investigation did and did not establish

Established

The read path was malformed and had been for the life of the tool. The working point in the tool was a test point. The three current registers are a per-channel current code on the LED driver, verified against the driver's own readback of the same value. The reference design's working values are consistent with the datasheet's current formula.

Not established

That every unit with a colour cast will be fixed by the working-point change. A wrong current ratio and a failing LED string produce the same white-field symptom, and separating them needs the module's own pattern test plus a measurement at the test points. That step belongs to the hardware bench, not to the register tool.

Why the boundary is written down. The most expensive outcome of a long debug is not the lost time — it is confidence borrowed from a conclusion that was never actually tested. A tool that produces numbers can make a bench measurement look unnecessary. Naming what the tool cannot see is what keeps that from happening.

Rules

Six checks before you believe a register reading

#CheckWhat it prevents
1Does the whole map read zero or all-ones?Condemning a part that is answering you correctly and being asked wrongly
2Is there a two-stage read, and did you send both stages?A read command that returns a plausible-looking constant
3Did a known-answer register pass first?Rendering a broken read as a physical measurement
4Do you know which chip owns this register?Applying one device's semantics to another device's register
5Is the tolerance small relative to the value?Shipping a test point as a working point
6Can the success flag ever be false?A status poll that reads a constant and reports success forever
Continue

Related notes

Bringing up a module that answers but will not behave?

Send us the register log and the two datasheets. We will tell you which reading we would distrust first — and which conclusion in the log has not actually been tested yet.

Start a project → All Tech Notes