DocID025202 Rev 7
494/1080
RM0365
Advanced-control timers (TIM1)
549
The source for BRK_ACTH can be internal only:
–
A clock failure event generated by the CSS. For further information on the CSS,
refer to
Section 9.2.7: Clock security system (CSS)
–
A PVD output
–
SRAM parity error signal
–
Cortex-M4
®
F LOCKUP (Hardfault) output
–
COMPx output, x = 1,2, and 6
The source for BRK2 can be:
•
An external source connected to the BKIN2 pin
•
An internal source coming from COMPx output, x = 1, 2, 4 or 6
If there are several break sources, the resulting break signal will be an OR between all the
input signals.
When exiting from reset, the break circuit is disabled and the MOE bit is low. You can enable
the break functions by setting the BKE and BKE2 bits in the TIMx_BDTR register. The break
input polarities can be selected by configuring the BKP and BKP2 bits in the same register.
BKEx and BKPx can be modified at the same time. When the BKEx and BKPx bits are
written, a delay of 1 APB clock cycle is applied before the writing is effective. Consequently,
it is necessary to wait 1 APB clock period to correctly read back the bit after the write
operation.
Because MOE falling edge can be asynchronous, a resynchronization circuit has been
inserted between the actual signal (acting on the outputs) and the synchronous control bit
(accessed in the TIMx_BDTR register). It results in some delays between the asynchronous
and the synchronous signals. In particular, if you write MOE to 1 whereas it was low, you
must insert a delay (dummy instruction) before reading it correctly. This is because you write
the asynchronous signal and read the synchronous signal.
The break can be generated by any of the break inputs (BRK, BRK2, BRK_ACTH), BRK
and BRK2 have:
–
Programmable polarity (BKPx bit in the TIMx_BDTR register)
–
Programmable enable bit (BKEx in the TIMx_BDTR register)
–
Programmable filter (BKxF[3:0] bits in the TIMx_BDTR register) to avoid spurious
events.
The digital filter feature is available on BRK and BRK2. It is not available on BRK_ACTH.
That means that the digital filter is:
•
Available when the break source is external and comes from the external inputs
BKIN/BKIN2.
•
Available when the break source is internal and connected to BRK (COMP4 output) or
BRK2 (all comparators’ outputs)
•
Not available when the break source is internal and connected to BRK_ACTH. (i.e.
PVD output, SRAM parity error signal, Cortex-M4
®
F LOCKUP (Hardfault) output or
COMPx output, x = 1, 2, 6).
Break events can also be generated by software using BG and B2G bits in the TIMx_EGR
register.