![Maxim Integrated MAX32660 Скачать руководство пользователя страница 112](http://html1.mh-extra.com/html/maxim-integrated/max32660/max32660_user-manual_1744484112.webp)
MAX32660 User Guide
Maxim Integrated
Page 112 of 195
10.6.2
Configuration
Configure the timer for Counter mode by doing the following:
1.
Set
.ten
= 0 to disable the timer.
2.
Set
.tmode
to 010b to select Counter mode.
3.
Configure the timer pin:
a.
Configure the pin as a timer input and configure the electrical characteristics as needed.
b.
Set
.tpol
to match the desired initial (inactive) state.
4.
If using the timer interrupt, enable the interrupt and set the interrupt priority.
5.
, if desired. This effects only the first period; subsequent timer periods always
reset
= 0x0000 0001.
6.
7.
Set
.ten
= 1 to enable the timer.
In Counter mode, the number of timer input transitions since timer start is calculated using the following equation:
Equation 10-5: Counter Mode Timer Input Transitions
𝐶𝑜𝑢𝑛𝑡𝑒𝑟 𝑚𝑜𝑑𝑒 𝑡𝑖𝑚𝑒𝑟 𝑖𝑛𝑝𝑢𝑡 𝑡𝑟𝑎𝑛𝑠𝑖𝑡𝑖𝑜𝑛𝑠 = 𝑇𝑀𝑅_𝐶𝑁𝑇
𝐶𝑈𝑅𝑅𝐸𝑁𝑇_𝐶𝑂𝑈𝑁𝑇_𝑉𝐴𝐿𝑈𝐸
– 𝑇𝑀𝑅_𝐶𝑁𝑇
𝑆𝑇𝐴𝑅𝑇_𝑉𝐴𝐿𝑈𝐸
Содержание MAX32660
Страница 4: ...MAX32660 User Guide Maxim Integrated Page 4 of 195 8 UART 84 9 Real Time Clock RTC 96 10 Timers 105...
Страница 7: ...MAX32660 User Guide Maxim Integrated Page 7 of 195 15 Trademarks 195 16 Revision History 195...
Страница 14: ...MAX32660 User Guide Maxim Integrated Page 14 of 195 Figure 2 1 MAX32660 High Level Block Diagram...