GD32W51x User Manual
1001
Manchester interface
When HPDF has two multiplexing serial data channels using Manchester encoding format,
two encoding formats can be configured by SITYP[1:0] bit field in HPDF_CHxCTL:
1.
When SITYP[1:0] = 2, Manchester code: rising edge = logic 0, falling edge = logic 1.
2.
When SITYP[1:0] = 3, Manchester code: rising edge = logic 1, falling edge = logic 0.
When Manchester code is used, the data stream between the external sigma delta modulator
and HPDF is only transmitted by the DATAINx pin. After the HPDF module Manchester
decoding, the clock signal and data are recovered from the serial data stream. The recovered
clock signal frequency must be between 0-10MHz and less than f
HPDFCLK
/6. The timing chart
of Manchester data transmission is shown in the figure below.
Figure 30-3. The sequence diagram of Manchester data transmission
1
0
0
1
1
SITYP[1:0]=2
SITYP[1:0]=3
Recovered clock
Recovered data
DATAINx
Manchester sequence
In order to receive and decode Manchester data correctly, configure the CKOUTDIV[7:0]
frequency divider according to the expected flow rate of Manchester data. The value of
CKOUTDIV [7:0] is calculated with reference to the following format:
((C1)Xt
HPDFCLK
)<T
Manchester_cloc k
<(2xCKOUTDIV×T
HPDFCLK
) (30-1)
Serial communication coding synchronization
After the serial channel is enabled, the data can only be received correctly after successful
synchronization. The synchronization of SPI code occurs after the first detection of clock input
signal by SPI data stream. If the channel uses Manchester coding, the first synchronization
occurs when the channel receives data stream changes from 1-0 or 0-1.
Before the transceiver of the serial channel synchronizes, the clock loss flag bit of channel is
set to 1. After successful synchronization, the clock loss flag bit can be cleared by CKLFC[1:0].
When the transceiver of the serial channel is not synchronized, the clock loss flag bit cannot
be cleared by the CKLFC[1:0]. Therefore, it is possible to determine whether the serial
channel is successfully synchronized by querying the CKLF[1:0] bit circularly. The following
figure shows the timing chart of the first synchronization of Manchester code.