SLVS-EC sensors protect the payload in one of two ways, chosen by the sensor mode. The receiver comes
in a matching build, chosen with the Payload protection parameter (ECC_SEL). The
lane count, ECC Option and CRC Option must match on both ends of the link.
Keep the protection of the build on. The CRC build runs with CRC Option on
(CRC_OPTION = 1); the ECC build runs with ECC Option 1 or 2 (ECC_OPTION). The option of
the other build has no effect. The core does not refuse a 0, but the supplied driver checks the setting against
the build when an image stream starts and prints a warning if the protection is off or set on the wrong build.
With the protection off the image still arrives; what is missing is the check.
| CRC build (ECC_SEL = 0) | ECC build (ECC_SEL = 1) | |
|---|---|---|
| Sensor mode | CRC Option on (CRC32 footer) | ECC Option 1 or 2 |
| What the core does | Checks the CRC32 footer of every packet | Corrects the payload block by block and removes the parity |
| Correction | Detection only | Option 1: 1 byte per block (2 parity bytes) Option 2: up to 2 bytes per block (4 parity bytes) |
| Configuration | CRC_OPTION | ECC_OPTION, ECC_BLOCK |
| Error accounting | PAY_CRC_ERR_CNT, and the Line Number of the last failing line in CRC_ERR_LINE | C_ERR_CNT, FRAME_ERR_CNT and ECC_FAIL_CNT |
| Both builds | Bad header copies and lost headers in HDR_CRC_ERR_CNT; one sticky flag for software to poll in CRC_ERR_LINE[31] | |
With ECC, the payload of every line is split into Basic Blocks of 224 information bytes and a last
block holding the rest, each followed by its parity. The core needs to know where the last block
starts; the ECC_BLOCK register gives that from Line Length and Pixel Bit (the driver
computes it, see Programming ECC_BLOCK).
A block the code cannot correct is passed on unchanged and counted in ECC_FAIL_CNT; the
core never alters data it cannot fix. On a healthy link ECC_FAIL_CNT stays at 0 and
C_ERR_CNT grows slowly, if at all. A fast-growing corrected count is an early warning of a
signal integrity problem, well before images degrade.