![Geehy SEMICONDUCTOR APM32F030x4x6x8xC Скачать руководство пользователя страница 199](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f030x4x6x8xc/apm32f030x4x6x8xc_user-manual_573629199.webp)
www.geehy.com Page 198
Field
Name
R/W
Description
7:0
REPCNT R/W
Repetition Counter Value
When the count value of the repeat counter is reduced to 0, an update event
will be generated, and the counter will start counting again from the REPCNT
value; the new value newly written to this register is valid only when an
update event occurs in next cycle.
15:8
Reserved
Channel 1 capture/compare register (TMR15_CC1)
Offset address: 0x34
Reset value: 0x0000
Field
Name R/W
Description
15:0
CC1
R/W
Capture/Compare Channel 1 Value
When the capture/compare channel 1 is configured as input mode:
CC1 contains the counter value transmitted by the last input capture channel 1
event.
When the capture/compare channel 1 is configured as output mode:
CC1 contains the current load capture/compare register value
Compare the value CC1 of the capture and compare channel 1 with the value
CNT of the counter to generate the output signal on OC1.
When the output compare preload is disabled (OC1PEN=0 for TMRx_CCM1
register), the written value will immediately affect the output compare results;
If the output compare preload is enabled (OC1PEN=1 for TMRx_CCM1
register), the written value will affect the output compare result when an update
event is generated.
Channel 2 capture/compare register (TMR15_CC2)
Offset address: 0x38
Reset value: 0x0000
Field
Name R/W
Description
15:0
CC2
R/W
Capture/Compare Channel 2 Value
Refer to TMR15_CC1
Break and dead-time register (TMR15_BDT)
Offset address: 0x44
Reset value: 0x0000
According to the lock setting, AOEN, BRKPOL, BRKEN, IMOS, RMOS and
DTS[7:0] bits all can be write-protected, and it is necessary to configure them
when writing to TMRx_BDT register for the first time.
Field
Name
R/W
Description
7:0
DTS
R/W
Dead Time Setup
DT is the dead duration, and the relationship between DT and register DTS
is as follows:
DTS[7:5]=0xx=>DT=DTS[7:0]×T
DTS
,
T
DTS
=TDTS
;
DTS[7:5]=10x=>DT=
(
64+DTS[5:0])×T
DTS
,
T
DTS
=2×T
DTS
;
DTS[7:5]=110=>DT=
(
32+DTS[4:0])×T
DTS
,
T
DTS
=8×T
DTS
;
DTS[7:5]=111=>DT=
(
32+DTS[4:0]
)
×T
DTS
,
T
DTS
=16×T
DTS
;
For example: assuming T
DTS
=125ns (8MHZ), the dead time setting is as
follows:
If the step time is 125ns, the dead time can be set from 0 to 15875ns;
If the step time is 250ns, the dead time can be set from 16μs to 31750ns;
If the step time is 1μs, the dead time can be set from 32μs to 63μs;
If the step time is 2μs, the dead time can be set from 64μs to 126μs.
Note: Once LOCK level (LOCKCFG bit in TMR15_BDT register) is set to 1,