SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
Sync Pulse Mode uses the Short packet and Long packet structures to accurately track the DPI interface timing. Figure 1-1 illustrates the packet sequence for a single frame.
The DSITX controller registers for this mode are used to generate the exact number of bytes required for each horizontal line based on the DPI line configuration and the BPP for the colour pixel data.
The packet structure for each type of line during the frame is shown below, Trigger Mapping Information. The calculation of the total number of bytes in any horizontal line must always be HLINE × bpp/8 bytes.
The DSI short packets and packet headers that are inserted by the controller must be accounted for:
Finally for lines with no active data, the controller will use either:
Program the DSI horizontal size registers as follows:
burst_mode = 0 and sync_pulse_active = sync_pulse_horizontal = 1;
HSA = (DPI_HSA × bpp/8)-14 – DPI HSA min value 5 for RGB888
HBP = (DPI_HBP × bpp/8)-12– DPI HBP min value 5 for RGB888
HACT = (DPI_HACT × bpp/8)
HFP = (DPI_HFP × bpp/8)-6 – DPI HFP min value 10 for RGB888
Note: (DPI_HACT × bpp/32) must be an integer. Total Line Length = div_roundup((HLINE × bpp/8), num of lanes);
(BLKLINE_PULSE_PCK) bytes} = (HLINE × bpp/8)-20-HSA;
(REG_LINE_DURATION)txbyteclks} = Total Line Length - div_roundup((HSA × bpp/8) - 14, number of lanes);
(VERT_BLANKING_DURATION)txbyteclks} = Total Line Length - div_roundup((HSA × bpp/8) - 14, number of lanes);
For example; a DPI with HSA = 12, HBP = 12, HACT = 1920, HFP = 24 and 16bpp will be 1968 pixel clocks for each horizontal line. This give each DSI HLINE of 3936 bytes. So for 4 lanes, 984 tx_byte_clk cycles;
HSA = (12 × 16/8) -14 = 10
HBP = (12 × 16/8) -12 = 12
HACT = (1920 × 16/8) = 3840
HFP = (24 × 16/8) -6 = 42
Total Line = div_roundup((12 + 12 + 1920 + 24) × 16/8, 4) = 984 tx_byte_clk cycles = 3936 bytes;
BLKLINE_PULSE_PCK = (3936) -20 -10 = 3906
REG_LINE_DURATION = 984 – div_roundup(12 × 2, 4) = 978
VERT_BLANKING_DURATION = 984 – div_roundup(12 × 2, 4) = 978
Confirming the calculation for each line with BLKLINE_MODE = 0;
VSS = VSSPkt + HSAPkt + HSEPkt + BLK_LINE_PULSE_PCKPkt = 4 + (4 + 10 + 2) +4 + (4 + 3906 + 2) = 3936;
VSALine = HSSPkt + HSAPkt + HSEPkt + BLK_LINE_PULSE_PCKPkt = 4 + (4 + 10 + 2) + 4 + (4 + 3906 + 2) = 3936;
VSE = VSEPkt + HSAPkt + HSEPkt + BLK_LINE_PULSE_PCKPkt = 4 + (4 + 10 + 2) + 4 + (4 + 3906 + 2) = 3936;
VACT = HSSPkt + HSAPkt + HSEPkt + HBPPkt + HACTPkt + HFPPkt = 4 + (4 +10 + 2) +4 + (4 + 12 + 2)+ (4 + 3840 +2) + (4 + 42 + 2) = 3936;
VFP = HSSPkt + HSAPkt + HSEPkt + BLK_LINE_PULSE_PCKPkt = 4 + (4 + 10 + 2) + 4 + (4 + 3906 + 2) = 3936;
VFPLast = HSSPkt + HSAPkt + HSEPkt + VERT_BLANKING_DURATION = 4 + (4 + 10 + 2) + 4 + (978 × 4) = 3936;
Confirming the calculation for each line with BLKLINE_MODE = 1 matches the tx_byte cycles;
VSS = VSSPkt + HSAPkt + HSEPkt + REG_LINE_DURATION = div_roundup((4 + (4 +10 + 2) + 4), 4) + 978 = 984;
VSALine = HSSPkt + HSAPkt + HSEPkt + REG_LINE_DURATION = div_roundup((4 + (4 +10 + 2) + 4), 4) + 978 = 984;
VSE = VSEPkt + HSAPkt + HSEPkt + REG_LINE_DURATION = div_roundup((4 + (4 + 10 + 2) + 4), 4) + 978 = 984;
VACT = HSSPkt + HSAPkt + HSEPkt + HBPPkt + HACTPkt + HFPPkt = div_roundup((4 + (4 + 10 + 2) +4 + (4 + 12 + 2)+ (4 + 3840 +2) + (4 + 42 + 2) = div_roundup((3936, 4) = 984;
VFP = HSSPkt + HSAPkt + HSEPkt + REG_LINE_DURATION = div_roundup((4 + (4 + 10 + 2) + 4), 4) + 978 = 984;
VFPLast = HSSPkt + HSAPkt + HSEPkt + VERT_BLANKING_DURATION = div_roundup((4 + (4 + 10 + 2) + 4 + (3912), 4) = 984;