GD32W51x User Manual
556
TIMERx_DMAINTEN
Direct generation
: if you want to generate a DMA request or Interrupt, you can set CHxG by
software directly.
Output compare mode
Figure 17-60. Output compare logic (with complementary output, x=0)
Capture/
compare register
CHxCV
Counter
o
u
tp
u
t
co
m
p
a
ra
to
r
Compare
output control
CHxCOMCTL
CNT>CHxCV
CNT=CHxCV
CNT<CHxCV
Output
complementary
protection
register
&Dead-Time
Output enable
and polarity
selector
CHxP,CHxNP
CHxE,CHxNE
OxCPRE
CHx_O
CHx_ON
Figure 17-60. Output compare logic (with complementary output, x=0)
show the logic
circuit of output compare mode. The relationship between the channel output signal
CHx_O/CHx_ON and the OxCPRE signal (more details refer to
) is described as below: The active level of OxCPRE is high, the output level of
CHx_O/CHx_ON depends on OxCPRE signal, CHxP/CHxNP bit and CHxE/CHxNE bit
(please refer to the TIMERx_CHCTL2 register for more details). For examples,
1)
Configure CHxP=0 (the active level of CHx_O is high, the same as OxCPRE), CHxE=1
(the output of CHx_O is enabled):
If the output of OxCPRE is active(high) level, the output of CHx_O is active(high) level;
If the output of OxCPRE is inactive(low) level, the output of CHx_O is active(low) level.
2) Configure CHxNP=0 (the active level of CHx_ON is low, contrary to OxCPRE), CHxNE=1
(the output of CHx_ON is enabled):
If the output of OxCPRE is active(high) level, the output of CHx_O is active(low) level;
If the output of OxCPRE is inactive(low) level, the output of CHx_O is active(high) level.
When CH0_O and CH0_ON are output at the same time, the specific outputs of CH0_O and
CH0_ON are related to the relevant bits (ROS, IOS, POE and DTCFG bits) in the
TIMERx_CCHP register. Please refer to
for more details.
In output compare mode, the TIMERx can generate timed pulses with programmable position,
polarity, duration and frequency. When the counter matches the value in the CHxVAL register
of an output compare channel, the channel (n) output can be set, cleared, or toggled based
on CHxCOMCTL. When the counter reaches the value in the CHxVAL register, the CHxIF bit
is set and the channel (n) interrupt is generated if CHxIE = 1. And the DMA request will be
assert, if CHxDEN =1.
So the process can be divided to several steps as below:
Step1:
Clock Configuration. Such as clock source, clock prescaler and so on.
Step2:
Compare mode configuration.
Содержание GD32W515 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32W51x Arm Cortex M33 32 bit MCU User Manual Revision 1 0 Nov 2021 ...
Страница 66: ...GD32W51x User Manual 66 Bits Fields Descriptions 31 0 UNIQUE_ID 95 64 Unique device ID ...
Страница 389: ...GD32W51x User Manual 389 The FWDGT timeout can be more accurate by calibrating the IRC32K ...
Страница 504: ...GD32W51x User Manual 504 ...
Страница 710: ...GD32W51x User Manual 710 ...