EasyManuals Logo

Maxim Integrated MAX32665 User Manual

Maxim Integrated MAX32665
457 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #331 background imageLoading...
Page #331 background image
MAX32665-MAX32668 User Guide
Maxim Integrated Page 331 of 457
16.4.1 One-Shot Mode Timer Period
The timer period ends on the timer clock following TMRn_CNT = TMRn_CMP.
The timer peripheral automatically performs the following actions at the end of the timer period:
1. TMRn_CNT is reset to 0x0000 0001.
2. The timer is disabled by setting TMRn_CN.ten = 0.
3. If the timer output is enabled, the timer pin is driven to its active state for one timer clock. It then returns to its
inactive state.
4. The timer interrupt bit TMRn_INT.irq will be set. An interrupt will be generated if enabled.
16.4.2 One-Shot Mode Configuration
Configure the timer for One-Shot mode by doing the following:
1. Set TMRn_CN.ten = 0 to disable the timer.Set TMRn_CN.tmode to 000b to select One-shot mode.
2. Set TMRn_CN.pres3:TMRn_CN.pres to set the prescaler that determines the timer frequency.
3. If using the timer pin:
a. Configure the pin as a timer output and configure the electrical characteristics as needed.
b. Set TMRn_CN.tpol to match the desired (inactive) state.
4. If using the timer interrupt, enable the interrupt and set the interrupt priority.
5. Write an initial value to TMRn_CNT, if desired. This effects only the first period; subsequent timer periods always
reset TMRn_CNT= 0x0000 0001.
6. Write the compare value to TMRn_CMP.
7. Set TMRn_CN.ten = 1 to enable the timer.
The timer period is calculated using the following equation:
Equation 16-2: One-shot Mode Timer Period
-
 


󰇛

󰇜
16.5 Continuous Mode (001b)
In Continuous mode, the timer peripheral increments TMRn_CNT until it matches TMRn_CMP, resets TMRn_CNT to
0x0000 0001, and continues incrementing. The timer peripheral can optionally toggle the state of the timer pin at the end
of the timer period.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Maxim Integrated MAX32665 and is the answer not in the manual?

Maxim Integrated MAX32665 Specifications

General IconGeneral
BrandMaxim Integrated
ModelMAX32665
CategoryMotherboard
LanguageEnglish