![Freescale Semiconductor PXR4030 Скачать руководство пользователя страница 521](http://html1.mh-extra.com/html/freescale-semiconductor/pxr4030/pxr4030_reference-manual_2330660521.webp)
Periodic Interrupt Timer (PIT_RTI)
Freescale Semiconductor
20-9
PXR40 Microcontroller Reference Manual, Rev. 1
20.4.2
Interrupts
All of the timers support interrupt generation. Refer to
Section 10.4.1, Interrupt Request Sources
, for
related vector addresses and priorities.
Timer interrupts can be disabled by setting the timer PIT_CH
n
_TCTRL[TIE] bit to zero. The
PIT_CH
n
_TFLG[TIF] bit is set to 1 when a timeout occurs on the associated timer, and is cleared by
writing a 1 to that bit.
20.5
Initialization and Application Information
20.5.1
Example Configuration
In the example configuration:
•
the PIT clock has a frequency of 50 MHz
•
timer 1 shall create an interrupt every 5.12 ms
First the PIT module is activated by writing a 0 to the MDIS bit in the PITCTRL register.
The 50 MHz clock frequency equates to a clock period of 20 ns. Timer 1 needs to trigger every 5.12 ms/20
ns = 256000 cycles. The value for the LDVAL register trigger would be calculated as (period / clock
period) -1.
This means that PIT_PIT_CH1_LDVAL with 0003E7FF hex.
The interrupt for Timer 1 is enabled by setting PIT_CH1_TCTRL[TIE] bit. The timer is started by writing
a 1 to the PIT_CH1_TCTRL[TEN] bit.
The following example pseudo-code matches the described setup:
// turn on PIT
PIT_MCR = 0x00;
// RTI
PIT_RTI_LDVAL = 0x004C4B3F; // setup RTI for 5000000 cycles
PIT_RTI_TCTRL[TIE] = 1; // let RTI generate interrupts
PIT_RTI_TCTRL[TEN] = 1; // start RTI
// Timer 1
PIT_CH1_LDVAL = 0x0003E7FF; // setup timer 1 for 256000 cycles
PIT_CH1_TCTRL[TIE] = 1; // enable Timer 1 interrupts
PIT_CH1_TCTRL[TEN] = 1; // start timer 1
20.5.2
Low Power Mode – Using the RTI for System Wakeup
This section describes the use of the low power mode, both with and without use of the RTI timer for
wakeup.
Содержание PXR4030
Страница 1: ...PXR40 Microcontroller Reference Manual Devices Supported PXR4030 PXR4040 PXR40RM Rev 1 06 2011...
Страница 30: ...PXR40 Microcontroller Reference Manual Rev 1 Freescale Semiconductor xxx...
Страница 40: ...PXR40 Microcontroller Reference Manual Rev 1 xl Freescale Semiconductor...
Страница 66: ...Memory Map PXR40 Microcontroller Reference Manual Rev 1 2 4 Freescale Semiconductor...
Страница 120: ...Signal Descriptions 3 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 158: ...Power Management Controller PMC 5 26 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 182: ...Frequency Modulated Phase Locked Loop FMPLL 6 24 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 278: ...System Integration Unit SIU 7 96 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 280: ...System Information Module PXR40 Microcontroller Reference Manual Rev 1 8 2 Freescale Semiconductor...
Страница 300: ...Boot Assist Module BAM 9 20 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 346: ...Interrupts and Interrupt Controller INTC 10 46 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 352: ...General Purpose Static RAM SRAM 11 6 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 432: ...Core e200z7 Overview PXR40 Microcontroller Reference Manual Rev 1 13 44 Freescale Semiconductor...
Страница 460: ...Peripheral Bridge PBRIDGE 15 16 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 478: ...Memory Protection Unit MPU 16 18 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 496: ...Error Correction Status Module ECSM 17 18 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 524: ...Periodic Interrupt Timer PIT_RTI 20 12 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 740: ...FlexRay Communication Controller FLEXRAY 22 156 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 860: ...FlexCAN Module 24 50 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 928: ...Deserial Serial Peripheral Interface DSPI 25 68 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 982: ...Enhanced Serial Communication Interface eSCI 26 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 1114: ...Enhanced Queued Analog to Digital Converter EQADC 27 132 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 1167: ...Decimation Filter Freescale Semiconductor 28 53 PXR40 Microcontroller Reference Manual Rev 1...
Страница 1168: ...Decimation Filter 28 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 1262: ...Enhanced Time Processing Unit eTPU2 29 94 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Страница 1399: ...Nexus Development Interface NDI Freescale Semiconductor 31 83 PXR40 Microcontroller Reference Manual Rev 1...
Страница 1400: ...Nexus Development Interface NDI 31 84 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...