Rev. 1.10
104
October 23, 2020
Rev. 1.10
105
October 23, 2020
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
Standard Type TM – STM
The Standard Type TM contains five operating modes, which are Compare Match Output, Timer/
Event Counter, Capture Input, Single Pulse Output and PWM Output modes. The Standard TM can
also be controlled with two external input pins and can drive one external output pin.
f
SYS
f
SYS
/4
f
H
/64
f
H
/16
f
SUB
STCK
000
001
010
011
100
101
110
111
STCK2~STCK0
16-bit Count-up Counter
8-bit Comparator P
CCRP
b8~b15
b0~b15
16-bit Comparator A
STON
STPAU
Comparator A Match
Comparator P Match
Counter Clear 0
1
Output
Control
Polarity
Control
STOC
STM1, STM0
STIO1, STIO0
STMAF Interrupt
STMPF Interrupt
STPOL
CCRA
STCCLR
Edge
Detector
STPI
STIO1, STIO0
f
SUB
Pin
Control
PxSn
STP
Note: The STM external pins are pin-shared with other functions, so before using the STM function, ensure that
the pin-shared function registers have been set properly to enable the STM pin function. The STCK and
STPI pins, if used, must also be set as an input by setting the corresponding bits in the port control register.
16-bit Standard Type TM Block Diagram
Standard Type TM Operation
The size of Standard TM is 16-bit wide and its core is a 16-bit count-up counter which is driven by
a user selectable internal or external clock source. There are also two internal comparators with the
names, Comparator A and Comparator P. These comparators will compare the value in the counter
with CCRP and CCRA registers. The CCRP comparator is 8-bit wide whose value is compared
with the highest 8 bits in the counter while the CCRA is the sixteen bits and therefore compares all
counter bits.
The only way of changing the value of the 16-bit counter using the application program, is to
clear the counter by changing the STON bit from low to high. The counter will also be cleared
automatically by a counter overflow or a compare match with one of its associated comparators.
When these conditions occur, a STM interrupt signal will also usually be generated. The Standard
Type TM can operate in a number of different operational modes, can be driven by different clock
sources including an input pin and can also control the output pin. All operating setup conditions are
selected using relevant internal registers.
Standard Type TM Register Description
Overall operation of the Standard TM is controlled using a series of registers. A read only register
pair exists to store the internal counter 16-bit value, while a read/write register pair exists to store
the internal 16-bit CCRA value. The STMRP register is used to store the 8-bit CCRP value. The
remaining two registers are control registers which setup the different operating and control modes.