SPRUHZ7K August 2015 – April 2024 AM5706 , AM5708 , AM5716 , AM5718 , AM5718-HIREL
To detect and correct transmission errors of the header of short and long packets, an 8-bit ECC is included in the header of packets (short and long packet). It allows single-bit errors to be corrected and 2-bit errors to be detected in the packet header.
The ECC concerns all the fields for a short packet (data ID and short-packet data field) and the packet header for a long packet (data ID and word count). The ECC can only correct one error. Additional errors cannot be repaired, but they are flagged. After the end of the Packet Header, the receiver reads the next Word Count * 8-bit data words of the Data Payload. While reading the Data Payload the receiver does not look for any embedded sync codes. Therefore, there are no limitations on the value of a data word.
The CSI2 receiver ECC is compared against the CSI2 transmitter ECC embedded in the bitstream. If the ECC does not match, an interrupt is triggered.
For long and short packets, the correction is always done, if there is only one error per packet header.
An ECC error with or without correction can be reported at two levels, depending on the type of packet. Table 8-15 describes the field in which events are logged. Logging cannot be disabled, but SW can set the corresponding bit in the CAL_CSI2_VC_IRQENABLE_l register to prevent event generation at a higher level.
Short and Long Packet | |
---|---|
With correction | Global CAL_CSI2_VC_IRQSTATUS_l[] ECC_CORRECTION_IRQ_x, where x = [0 to 3] |
Without correction | Global CAL_CSI2_VC_IRQSTATUS_l[] ECC_NO_CORRECTION_IRQ_x, where x = [0 to 3] |
The ECC check can be disabled (short and long packet) by setting the CAL_CSI2_PPI_CTRL_l[2] ECC_EN bit to 0. Setting the bit to 1 enables the ECC check.
Refer to the MIPI CSI-2 1.0 standard for more details on ECC generation.