GD32W51x User Manual
999
After the serial output clock source is determined, the output clock frequency division can be
controlled by configuring the CKOUTDIV [7:0] bit field in the HPDF_CH0CTL register. When
CKOUTDIV[7:0] ≠ 0, the value of the serial output clock divider is CKOUTDIV[7:0]+1. When
CKOUTDIV[7:0] = 0, the serial output clock is disabled and the pin of CKOUT remains low.
In addition, after clearing HPDFEN, the signal of serial output clock can also be stopped.
When the serial output clock source is the system clock (CKOUTSEL = 0), if clear HPDFEN,
the serial output clock stopped after 4 system clocks. When the serial output clock source is
the audio clock (CKOUTSEL = 1), if clear HPDFEN, the serial output clock stopped after one
system clock and three audio clocks.
The serial output clock source can only be modified when HPDFEN = 0. In order to avoid the
burr signal on the pin of CKOUT, the software can only modify the value of the CKOUTSEL
bit in the HPDF_CH0CTL register after the serial output clock stopped.
The frequency range of the serial output clock is 0-20MHz.
30.3.4.
Multiplex serial data channel
HPDF has two multiplexing serial data channels, which support SPI code and Manchester
code. The interface type supported can be selected for the current channel by configuring the
SITYP[1:0] bit field in the HPDF_CHxCTL register.
SPI interface
Under the standard SPI interface, sigma delta modulator sends 1-bit data stream to the serial
channel by the pin of DATAINx. The clock signal between HPDF and sigma delta modulator
can be output by CKOUT pin or input by CKINx pin.
The data sampling point in SPI communication is determined by the SITYP[1:0] bit field and
SPICKSS[1:0] bit field in HPDF_CHxCTL register. The data sampling points in SPI
communication are shown in the table.
Table 30-2. SPI interface clock configuration
SPICKSS[1:0]
Clock source
SITYP[1:0] Sam pling point
Description
00
CKINx signal
00
rising edge
Data is sampled at the rising edge
of the external serial input clock
signal
01
falling edge
Data is sampled at the falling
edge of the external serial input
clock signal
01
CKOUT signal
00
rising edge
The data is sampled at the rising
edge of the internal serial output
clock signal
01
falling edge
The data is sampled at the falling
edge of the internal serial output