GD32W51x User Manual
897
JPEG mode
DCI supports JPEG video/picture compression format in hardware synchronization mode. In
JPEG mode (JM bit in DCI_CTL is set), the DCI_Vs is used to indicate start of a new frame,
and DCI_Hs is used as stream data valid signal.
Figure 25-3. Hardware synchronization mode: JPEG format supporting
JPEG Data
JPEG Data
DCI_PixClk
DCI_Vs
DCI_Hs
DCI_PixData[13:0]
JPEG Frame
JPEG Data
25.5.2.
Embedded synchronization mode
DCI supports embedded synchronization mode. In this mode there are only DCI_PixData and
DCI_PixClk signals in DCI interface and the synchronization information is embedded in the
pixel data. This mode is enabled by setting ESM bit and clearing JM bit in DCI_CTL register.
In embedded synchronization mode, line and frame synchronization information is encoded
into sync code and embedded into the pixel data. There are four kinds of sync code: Line
Start(LS), Line End(LE), Frame Start(FS) and Frame End(FE). In this mode the data width is
forced to 8 and each sync code is composed by 4-byte sequence: FF-00-00-MN, and MN is
defined in DCI_SC register. In embedded synchronization mode, the 0xFF and 0x00 should
not appear in pixel data to avoid mistake.
In embedded synchronization mode, DCI starts to detect the sync codes after enabled and
recover line/frame synchronization information. For example, DCI starts to capture a new
frame if it detects a Frame End code and then a Frame Start Code.
When detecting sync code, it is possible to make DCI compare only a few bits of MN byte in
FF_00_00_MN sequence by configuring sync code unmask register (DCI_SCUMSK). DCI
will only compare bits unmasked by DCI_SCUMSK register. For example: LS in DCI_SC
register is A5 and LSM in DCI_SCUMSK is F0, then DCI will only compare the higher 4 bits
for LS sync code and thus, FF-00-00-A6 sequence will also be detected as a LS code.
25.5.3.
Capture data using snapshot or continuous capture modes
The DCI supports two capture modes: snapshot and continuous capture. Capture mode is
configured by SNAP bit in DCI_CTL register.
After correctly configure, enable DCI and set CAP bit in DCI_CTL register, the DCI begins to
detect frame start. It begins to capture data once a frame start is detected. In snapshot
mode(SNAP=1), DCI automatically stops capturing and clears the CAP bit after a whole frame
is captured completely, while in continuous mode, DCI prepares to capture the next frame.