
• For each timer channel that is to be enabled, configure the timer mode of operation
(MODE bits), Trigger source selection (TRG_SEL & TRG_SRC) and Trigger
control bits (TROT, TSOT, TSOI bits) in the TCTRLn register.
• Configure the channels that are to be chained by setting the CHAIN bit in the
corresponding channel's TCTRLn register.
• For channels configured in Compare Mode, set the timer timeout value by
programming the appropriate value in TVAL register for those channels.
• Configure TIEn bits in MIER register for those channels which are required to
generate interrupt on timer timeout.
• Configure the low power mode functionality of the module by setting the DBG_EN
and DOZE_EN bits in the MCR register. This is common to all timer channels.
• Enable the channel timers by setting the corresponding T_EN bit in the
corresponding channel's TCRTLn register.
• For channels configured in Capture Mode, the timer value can be read from TVALn
register when channel timeout occurs.
• At any time, the current value of the timer for any channel can be read by reading the
corresponding channel's CVALn register.
• The timer interrupt flag bits (TIFn) in MSR register get asserted on timer timeout.
These bits can be cleared by writing '1' to them.
28.4.2 Timer Modes
The timer mode is configured by setting an appropriate value in the MODE bits in
TCTRLn register. The timer modes supported are:
• 32-bit Periodic Counter: In this mode the counter will load and then decrement down
to zero. It will then set the timer interrupt flag and assert the output pre-trigger.
• Dual 16-bit Periodic Counter: In this mode, the counter will load and then the lower
16-bits will decrement down to zero, which will assert the output pre-trigger. The
upper 16-bits will then decrement down to zero, which will negate the output pre-
trigger and set the timer interrupt flag.
• 32-bit Trigger Accumulator: In this mode, the counter will load on the first trigger
rising edge and then decrement down to zero on each trigger rising edge. It will then
set the timer interrupt flag and assert the output pre-trigger.
• 32-bit Trigger Input Capture: In this mode, the counter will load with 0xFFFF_FFFF
and then decrement down to zero. If a trigger rising edge is detected, it will store the
inverse of the current counter value in the load value register, set the timer interrupt
flag and assert the output pre-trigger.
The timer operation is further controlled by Trigger Control bits (TSOT, TSOI, TROT)
which control the timer load, reload, start and restart of the timers.
Chapter 28 Low Power Interrupt Timer (LPIT)
K32 L2A Reference Manual, Rev. 2, 01/2020
NXP Semiconductors
759
Содержание K32 L2A Series
Страница 2: ...K32 L2A Reference Manual Rev 2 01 2020 2 NXP Semiconductors...
Страница 42: ...K32 L2A Reference Manual Rev 2 01 2020 42 NXP Semiconductors...
Страница 122: ...Flash Memory Clock K32 L2A Reference Manual Rev 2 01 2020 122 NXP Semiconductors...
Страница 146: ...Module operation in low power modes K32 L2A Reference Manual Rev 2 01 2020 146 NXP Semiconductors...
Страница 158: ...Debug and security K32 L2A Reference Manual Rev 2 01 2020 158 NXP Semiconductors...
Страница 174: ...Module Signal Description Tables K32 L2A Reference Manual Rev 2 01 2020 174 NXP Semiconductors...
Страница 246: ...Application information K32 L2A Reference Manual Rev 2 01 2020 246 NXP Semiconductors...
Страница 322: ...Kinetis Bootloader Status Error Codes K32 L2A Reference Manual Rev 2 01 2020 322 NXP Semiconductors...
Страница 344: ...Application initialization information K32 L2A Reference Manual Rev 2 01 2020 344 NXP Semiconductors...
Страница 374: ...CMP Trigger Mode K32 L2A Reference Manual Rev 2 01 2020 374 NXP Semiconductors...
Страница 384: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 384 NXP Semiconductors...
Страница 592: ...Application Information K32 L2A Reference Manual Rev 2 01 2020 592 NXP Semiconductors...
Страница 602: ...Initialization and application information K32 L2A Reference Manual Rev 2 01 2020 602 NXP Semiconductors...
Страница 656: ...Functional Description K32 L2A Reference Manual Rev 2 01 2020 656 NXP Semiconductors...
Страница 664: ...Functional Description K32 L2A Reference Manual Rev 2 01 2020 664 NXP Semiconductors...
Страница 744: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 744 NXP Semiconductors...
Страница 762: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 762 NXP Semiconductors...
Страница 806: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 806 NXP Semiconductors...
Страница 868: ...Integer square root K32 L2A Reference Manual Rev 2 01 2020 868 NXP Semiconductors...
Страница 976: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 976 NXP Semiconductors...
Страница 1012: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1012 NXP Semiconductors...
Страница 1094: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1094 NXP Semiconductors...
Страница 1132: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1132 NXP Semiconductors...
Страница 1182: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1182 NXP Semiconductors...
Страница 1290: ...Functional description K32 L2A Reference Manual Rev 2 01 2020 1290 NXP Semiconductors...
Страница 1344: ...USB Voltage Regulator Module Signal Descriptions K32 L2A Reference Manual Rev 2 01 2020 1344 NXP Semiconductors...
Страница 1356: ...Initialization Application Information K32 L2A Reference Manual Rev 2 01 2020 1356 NXP Semiconductors...