Clearing The Ocxref Signal On An External Event; Figure 81. Clearing Timx Ocxref - STMicroelectronics STM32F05 series Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

RM0091
15.3.13

Clearing the OCxREF signal on an external event

The OCxREF signal for a given channel can be driven Low by applying a High level to the
ETRF input (OCxCE enable bit of the corresponding TIMx_CCMRx register set to '1'). The
OCxREF signal remains Low until the next update event, UEV, occurs.
This function can only be used in output compare and PWM modes, and does not work in
forced mode.
For example, the OCxREF signal) can be connected to the output of a comparator to be
used for current handling. In this case, the ETR must be configured as follow:
1.
The External Trigger Prescaler should be kept off: bits ETPS[1:0] of the TIMx_SMCR
register set to '00'.
2.
The external clock mode 2 must be disabled: bit ECE of the TIMx_SMCR register set to
'0'.
3.
The External Trigger Polarity (ETP) and the External Trigger Filter (ETF) can be
configured according to the user needs.
Figure 81
for both values of the enable bit OCxCE. In this example, the timer TIMx is programmed in
PWM mode.

Figure 81. Clearing TIMx OCxREF

counter (CNT)
ETRF
(OCxCE='0')
(OCxCE='1')
Note:
In case of a PWM with a 100 % duty cycle (if CCRx>ARR), then OCxREF is enabled again
at the next counter overflow.
shows the behavior of the OCxREF signal when the ETRF Input becomes High,
(CCRx)
OCxREF
OCxREF
Doc ID 018940 Rev 1
Advanced-control timers (TIM1)
OCREF_CLR
OCREF_CLR
becomes high
still high
253/742

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F05 series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents