Rev. 1.10
108
October 23, 2020
Rev. 1.10
109
October 23, 2020
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
generated even if the value of the CCRP bits is less than that of the CCRA registers. Therefore when
STCCLR is high no STMPF interrupt request flag will be generated. In the Compare Match Output
Mode, the CCRA can not be set to
“
0”.
If the CCRA bits are all zero, the counter will overflow when it reaches its maximum 16-bit, FFFF
Hex, value, however here the STMA
F interrupt request flag will not be generated.
As the name of the mode suggests, after a comparison is made, the STM output pin, will change
state. The STM output pin condition however only changes state when a STMAF interrupt request
flag is generated after a compare match occurs from Comparator A. The STMPF interrupt request
flag, generated from a compare match occurs from Comparator P, will have no effect on the STM
output pin. The way in which the STM output pin changes state are determined by the condition of
the STIO1 and STIO0 bits in the STMC1 register. The STM output pin can be selected using the
STIO1 and STIO0 bits to go high, to go low or to toggle from its present condition when a compare
match occurs from Comparator A. The initial condition of the STM output pin, which is setup after
the STON bit changes from low to high, is setup using the STOC bit. Note that if the STIO1 and
STIO0 bits are zero then no pin change will take place.
Counter Value
0xFFFF
CCRP
CCRA
STON
STPAU
STPOL
CCRP Int.
Flag STMPF
CCRA Int.
Flag STMAF
STM O/P Pin
Time
CCRP=0
CCRP > 0
Counter overflow
CCRP > 0
Counter cleared by CCRP value
Pause
Resume
Stop
Counter
Restart
STCCLR = 0; STM [1:0] = 00
Output pin set
to initial Level
Low if STOC=0
Output Toggle with
STMAF flag
Note STIO [1:0] = 10
Active High Output select
Here STIO [1:0] = 11
Toggle Output select
Output not affected by STMAF
flag. Remains High until reset
by STON bit
Output Pin
Reset to Initial value
Output controlled by other
pin-shared function
Output Inverts
when STPOL is high
Compare Match Output Mode – STCCLR=0
Note: 1. With STCCLR=0, a Comparator P match will clear the counter
2. The STM output pin is controlled only by the STMAF flag
3. The output pin is reset to its initial state by a STON bit rising edge