GD32W51x User Manual
1012
the upper threshold.
After each channel sends a comparison request, it will be executed within 8 HPDF clock
cycles. Therefore, the bandwidth of each channel is limited to 8 HPDF clock cycles (if
TMCHEN[1:0]=3). Since the maximum sampling frequency of the input channel is f
HPDFCLK
/4,
at this input clock speed, the threshold monitor filter cannot be bypassed (TMFOR=0).
Therefore, the user must correctly configure the threshold monitor filter parameters and the
number of channels monitored based on the input sampling clock speed and f
HPDFCLK
.
In fast mode, reading the TMDATA[15:0] bit field in HPDF_CHxTMFDT register to get the
threshold monitor filter data for the given channel x. The number of serial samples required
for a result of the threshold monitor filter output (at the serial input clock frequency f
CKIN
) is as
follows:
1.
First conversion:
FastSinc filter: Number of samples is equal to (TMSFO×4+ 2+1).
Sinc
X
filter (x=1..5): Number of samples is equal to (((TMSFO[4:0]+1)×TMFOR)+
TMSFO+1).
2.
Subsequent conversions other than the first conversion:
FastSinc and Sinc
X
filter (x=1..5): Number of samples is equal to
(TMSFO[4:0]+1)×(IOR[7:0]+1).
Threshold monitor flag
The global state of the threshold monitor is the TMEOF flag in HPDF_FLTySTAT register.
When TMEOF=1, it indicates that at least one threshold monitor event has occurred, that is,
an event that exceeds the (upper/lower limit) threshold is generated. If the threshold monitor
event interrupt TMIE=1 in HPDF_FLTyCTL1 register is enabled, an threshold monitor interrupt
can be generated. When all HTF[1:0] and LTF[1:0] are cleared, the TMEOF bit is cleared.
The HPDF_FLTyTMSTAT register defines the error event flag of the channel exceeding the
threshold. The HTF[1:0] bit field indicates whether the maxmum threshold HTVAL[23:0] has
been exceeded on the channel x. The LTF[1:0] bit field indicates whether the minimum
threshold LTVAL[23:0] value has been exceeded on channel x. Clear the threshold event flag
by writing "1" to the corresponding HTFC[1:0] or LTFC[1:0] bit in the HPDF_FLTyTMFC
register.
There are 2 break output signals HPDF_BREAK[0] and HPDF_BREAK[1] in the HPDF
module. The break output signals are assigned to threshold monitor threshold event by setting
the HTBSD[1:0] and LTBSD[1:0] bit fields in the HPDF_FLTyTMHT register and the
HPDF_FLTyTMLT register.
The signal source of the broken output signal HPDF_BREAK[0] is TIMER15, and the signal
source of HPDF_BREAK[1] is TIMER16.