Just find a piece of C code to calculate Ecc byte for MIPI DSI header.
The Ecc byte is derived from Hamming-modified Code (72,64). DSI systems shall use a 5+1 bit Hamming-modified
code (30, 24), allowing for protection of up to twenty-four data bits.
The Hsync start packet is 0x21,0x00,0x00,0x12.
I just compile it as vs2008 project, and verify the Hsync start short packet ecc byte is 0x12.
While it is 0x0f in lattice RD1184 implementation, so there must be something wrong.
Command output:
D:\mipi\mipi_header_ecc\mipi_header_ecc\Debug>mipi_header_ecc.exe
Checking Codes(eg.0x1234AF, "-" for exit): 0x210000
Result:0x12
Reference:
1, Version 1.02.00 28-Jun-2010 MIPI Alliance Specification for DSI
2,
http://www.metsky.com/archives/618.html