
NUC126
Aug. 08, 2018
Page
438
of 943
Rev 1.03
NUC12
6 S
E
RI
E
S
T
E
CH
NI
CA
L R
E
F
E
RE
NCE
MA
NUA
L
Edge Detect
Brake Interrupt
BRKEIF0 or BRKEIF1 (PWM_INTSTS1[1:0])
BRK_INT
Low level
detection
Level Detect
Brake Interrupt
BRKEIEN0_1 (PWM_INTEN1[0])
BRKLIF0 or BRKLIF1
(PWM_INTSTS1[9:8])
BRKLIEN0_1 (PWM_INTEN1[8])
Edge Detect
Brake Source
Level Detect
Brake Source
Note:
denotes falling edge detect
BRKESTS0
(PWM_INTSTS1[16])
PWMx_CH1
PWMx_CH0
BRKLSTS0 (PWM_INTSTS1[24])
BRKESTS1(PWM_INTSTS1[17])
BRKLSTS1(PWM_INTSTS1[25])
BRKAEVEN
(PWM_BRKCTL0_1[17:16])
BRKAODD
(PWM_BRKCTL0_1[19:18])
Figure 6.13-30 Brake Block Diagram for PWMx_CH0 and PWMx_CH1 Pair
Figure 6.13-31 illustrates the edge detector waveform for PWMx_CH0 and PWMx_CH1 pair. In this
case, the edge detect brake source has occurred twice for the brake events. When the event occurs,
both of the BRKEIF0 and BRKEIF1 flags are set and BRKESTS0 and BRKESTS1 bits are also set to
indicate brake state of PWMx_CH0 and PWMx_CH1. For the first occurring event, software writes 1 to
clear the BRKEIF0 flag. After that, the BRKESTS0 bit is cleared by hardware at the next start of the
PWM period. At the same moment, the PWMx_CH0 outputs the normal waveform even though the
brake event is still occurring. The second event also triggers the same flags, but at this time, software
writes 1 to clear the BRKEIF1 flag. Afterward, PWMx_CH1 outputs normally at the next start of the
PWM period.
As a contrast to the edge detector example, Figure 6.13-32 illustrates the level detector waveform for
PWMx_CH0 and PWMx_CH1 pair. In this case, the BRKLIF0 and BRKLIF1 flags can only indicate the
brake event having occurred. The BRKLSTS0 and BRKLSTS1 brake states will automatically recover
at the start of the next PWM period no matter at what states the BRKLIF0 and BRKLIF1 flags are at
that moment.