Ameba-D User Manual
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
200
The auto-reload register is preloaded. Writing to or reading from the auto-reload register accesses the preload register. The contents of the
preload register are transferred into the shadow register permanently or at each update event depending on the ARPE bit in the TIMx_CR
register. The update event is sent when the counter reaches the overflow and if the UDIS bit equals to 0 in the TIMx_CR register. It can also be
generated by software.
The prescaler can divide the counter clock frequency by any factor between 1 and 256. It is based on a 8-bit counter controlled through a 8-bit
register (in the TIMx_PSC register). It can be changed on the fly as this control register is buffered. The new prescaler ratio is taken into account
at the next update event.
Fig 10-6 and Fig 10-7 give some examples of the counter behavior when the prescaler ratio is changed on the fly.
CK_PSC
Timer clock=CK_CNT
CEN
F7
F8
F9
FA
Counter register
Prescaler counter
0
Prescaler buffer
FB
FC
00
02
1
01
Prescaler control register
03
0
1
0
1
0
Update event (UEV)
Write a new value in TIMx_PSC
0
1
F7
1
0
1
0
Fig 10-6 Counter timing diagram with prescaler division change from 1 to 2
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03