GD32W51x User Manual
1004
1 is own pin, DATAINx and CKINx. When SITYP[1:0] = 2b
’
00, the serial data stream is
sampled at the rising edge of the clock signal, that is, the input of channel 1 is the left
channel data.
3.
Set the CHPINSEL to 1 in channel 0, and the DATAINx and CKINx pins will be used for
channel 0. When SITYP[1:0] = 2b
’
01, the serial data stream is sampled at the falling edge
of the clock signal, that is, the input of channel 0 is the right channel data.
4.
Configure channel 0 and channel 1 with corresponding filters to filter the left and right
channel data of PDM microphone.
The channel pin redirection diagram of HPDF module is shown in
Figure 30-6. Channel pins redirection
CHANNEL1
FLT1
DATAIN1
CHANNEL0
FLT0
CKIN1
DATAIN0
CKIN0
C
H
PI
N
SEL
RCS
C
H
PI
N
SE
L
Pulses skipper
When PCLK2 is used as the system clock source of HPDF, the pulse skipper function can be
used. Pulse skipper refers to that the serial input data stream enters the filter after skipping a
specified number of clock pulses, so as to discard a certain number of bit bits. This operation
will cause the final output sample (and the next sample) from the filter to be calculated from
the subsequent input data compared to the data stream that was not skipped.
The number of pulses to be skipped is determined by the PLSK[5:0] bit field in the
HPDF_CHxPS register. Write the value to PLSK[5:0] bit field, and the specified channel will
start to perform the pulse skipper function. Read the of PLSK[5:0], indicating the number of
remaining pulse skipper not executed. For a single write operation of PLSK[5:0], the maximum
number of pulse skipper executed is 63. More pulse skipper can be obtained by writing to
PLSK[5:0] bit field several times.
Serial input interface configuration
The configuration steps of serial input interface of HPDF module are as follows:
1.
Configure clock output prescaler: by configuring the CKOUTDIV[7:0] bit field in the