GD32W51x User Manual
1013
30.3.11.
Malfunction monitor
The purpose of the malfunction monitor is to be able to send a signal with an extremely fast
response time when the analog signal reaches a saturation value and remains in this state
for a given time. This feature can be used to detect short-circuit or open-circuit faults (e.g.
overcurrent/overvoltage).
The broken output signals HPDF_BREAK[0] and HPDF_BREAK[1]
can be assigned to the malfunction monitor event, which can be configured by the
MMBSD[1:0] bit field in the HPDF_CHxCFG1 register. The broken output signal is the same
as the threshold monitor.
The input data of the malfunction monitor comes from the serial input data of the
channel.When the channel input data source is parallel data, the malfunction monitor function
is prohibited.There is an up counter on each input channel to record how many consecutive
0 or 1 on the output of the serial data receiver. When the counter reaches the threshold value
of the malfunction monitor (MMCT[7:0] bits in the HPDF_CHxCFG1 register), a malfunction
event occurs. If a 0-1 or 1-0 change is encountered when monitoring the data stream, the
value of the counter will be automatically cleared and counted again.
The user can enable the malfunction monitor function by setting the MMEN bit in
HPDF_CHxCTL register.
When a malfunction event occurs on the channel, the corresponding
malfunction monitor flag MMF[1:0] is set. The corresponding flag can be cleared by MMFC[1:0]
in HPDF_FLTyINTC. If channel x is disabled (CHEN=0), the hardware will also clear the
malfunction monitor flag.
30.3.12.
Extremes monitor
The extremes monitor is used to sample the minimum and maximum values (peak to peak)
of the final output data word. An extremes monitor can be configured to sample the extreme
values of multiple channels through the EMCS[1:0] bit field in HPDF_FLTyCTL1 register.
If the sampling final output data word is higher than the value in the maximum value register
of the extremes monitor (MAXVAL[23:0] bits in the HPDF_FLTyEMMAX register), the value
of this register is updated to the current final output data. If the sampling final output data
word is smaller than the value in the minimum value register of the extremes monitor
(MINVAL[23:0] bits in HPDF_FLTyEMMIN register), the value of this register is updated to the
current final output data. The values of the MAXDC bit and the MINDC bit indicate which
channel the maximum/minimum value comes from.
When reading the HPDF_FLTyEMMAX or HPDF_FLTyEMMIN register, the maximum or
minimum value is updated with the reset value.
30.3.13.
Data unit
The data unit is the last part of data processing in the entire HPDF module, and the flow of
data processing by the HPDF module is shown in the following figure.