![Maxim Integrated MAX32660 User Manual Download Page 108](http://html1.mh-extra.com/html/maxim-integrated/max32660/max32660_user-manual_1744484108.webp)
MAX32660 User Guide
Maxim Integrated
Page 108 of 195
10.4.2
Configuration
Configure the timer for One-Shot mode by doing the following:
1.
Set
.ten
= 0 to disable the timer
2.
Set
.tmode
to 000b to select One-shot mode.
3.
Set
.pres3
.pres
to set the prescaler that determines the timer frequency.
4.
If using the timer pin:
a.
Configure the pin as a timer output and configure the electrical characteristics as needed.
b.
Set
.tpol
to match the desired (inactive) state.
5.
If using the timer interrupt, enable the interrupt and set the interrupt priority.
6.
, if desired. This effects only the first period; subsequent timer periods always
reset
= 0x0000 0001.
7.
8.
Set
.ten
= 1 to enable the timer.
The timer period is calculated using the following equation:
Equation 10-2: One-shot Mode Timer Period
𝑂𝑛𝑒-𝑠ℎ𝑜𝑡 𝑚𝑜𝑑𝑒 𝑡𝑖𝑚𝑒𝑟 𝑝𝑒𝑟𝑖𝑜𝑑 𝑖𝑛 𝑠𝑒𝑐𝑜𝑛𝑑𝑠 =
𝑇𝑀𝑅_𝐶𝑀𝑃 − 𝑇𝑀𝑅_𝐶𝑁𝑇
𝐼𝑁𝐼𝑇𝐼𝐴𝐿_𝑉𝐴𝐿𝑈𝐸
+ 1
𝑓
𝐶𝑁𝑇_𝐶𝐿𝐾
(𝐻𝑧)