![NXP Semiconductors SAFE ASSURE Qorivva MPC5601P Скачать руководство пользователя страница 796](http://html.mh-extra.com/html/nxp-semiconductors/safe-assure-qorivva-mpc5601p/safe-assure-qorivva-mpc5601p_reference-manual_1721898796.webp)
Chapter 30 Periodic Interrupt Timer (PIT)
MPC5602P Microcontroller Reference Manual, Rev. 4
796
Freescale Semiconductor
Figure 30-9. Dynamically setting a new load value
30.4.1.2
Debug mode
In Debug mode, the timers are frozen. This is intended to aid software development, allowing the
developer to halt the processor, investigate the current state of the system (e.g., timer values) and then
continue the operation.
30.4.2
Interrupts
All of the timers support interrupt generation. Refer to
Chapter 9, “Interrupt Controller (INTC)
for related
vector addresses and priorities.
Timer interrupts can be disabled by setting the TIE bits to zero. The timer interrupt flags (TIF) are set to 1
when a timeout occurs on the associated timer, and are cleared to 0 by writing a 1 to that TIF bit.
30.5
Initialization and application information
30.5.1
Example configuration
In the example configuration:
•
The PIT clock has a frequency of 50 MHz
•
Timer 1 creates an interrupt every 5.12 ms
•
Timer 3 creates a trigger event every 30 ms
First the PIT module needs to be activated by writing a 0 to the MDIS bit in the PITMCR.
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 and timer 3 every 30 ms/20 ns = 1500000 cycles. The value for the LDVAL
register trigger would be calculated as (period / clock period) – 1.
The LDVAL registers must be configured as follows:
•
LDVAL for Timer 1: 0x0003_E7FF
•
LDVAL for Timer 3: 0x0016_E35F
The interrupt for Timer 1 is enabled by setting TIE in the TCTRL1 register. The timer is started by writing
a 1 to bit TEN in the TCTRL1 register.
p1
p1
Timer Enabled
New Start
Value p2 set
p1
p2
Start Value = p1
p2
Trigger
Event
Содержание SAFE ASSURE Qorivva MPC5601P
Страница 2: ...MPC5602P Microcontroller Reference Manual Rev 4 2 Freescale Semiconductor ...
Страница 4: ...MPC5602P Microcontroller Reference Manual Rev 4 4 Freescale Semiconductor ...
Страница 62: ...Chapter 2 MPC5602P Memory Map MPC5602P Microcontroller Reference Manual Rev 4 62 Freescale Semiconductor ...
Страница 104: ...Chapter 4 Clock Description MPC5602P Microcontroller Reference Manual Rev 4 104 Freescale Semiconductor ...
Страница 128: ...Chapter 6 Power Control Unit MC_PCU MPC5602P Microcontroller Reference Manual Rev 4 128 Freescale Semiconductor ...
Страница 272: ...Chapter 12 e200z0 and e200z0h Core MPC5602P Microcontroller Reference Manual Rev 4 272 Freescale Semiconductor ...
Страница 280: ...Chapter 14 Crossbar Switch XBAR MPC5602P Microcontroller Reference Manual Rev 4 280 Freescale Semiconductor ...
Страница 306: ...Chapter 16 Internal Static RAM SRAM MPC5602P Microcontroller Reference Manual Rev 4 306 Freescale Semiconductor ...
Страница 380: ...Chapter 17 Flash Memory MPC5602P Microcontroller Reference Manual Rev 4 380 Freescale Semiconductor ...
Страница 532: ...Chapter 21 LIN Controller LINFlex MPC5602P Microcontroller Reference Manual Rev 4 532 Freescale Semiconductor ...
Страница 578: ...Chapter 22 FlexCAN MPC5602P Microcontroller Reference Manual Rev 4 578 Freescale Semiconductor ...
Страница 708: ...Chapter 25 FlexPWM MPC5602P Microcontroller Reference Manual Rev 4 708 Freescale Semiconductor ...
Страница 742: ...Chapter 26 eTimer MPC5602P Microcontroller Reference Manual Rev 4 742 Freescale Semiconductor ...
Страница 760: ...Chapter 27 Functional Safety MPC5602P Microcontroller Reference Manual Rev 4 760 Freescale Semiconductor ...
Страница 782: ...Chapter 28 Fault Collection Unit FCU MPC5602P Microcontroller Reference Manual Rev 4 782 Freescale Semiconductor ...
Страница 788: ...Chapter 29 Wakeup Unit WKPU MPC5602P Microcontroller Reference Manual Rev 4 788 Freescale Semiconductor ...
Страница 798: ...Chapter 30 Periodic Interrupt Timer PIT MPC5602P Microcontroller Reference Manual Rev 4 798 Freescale Semiconductor ...
Страница 816: ...Chapter 32 Cyclic Redundancy Check CRC MPC5602P Microcontroller Reference Manual Rev 4 816 Freescale Semiconductor ...
Страница 848: ...Chapter 33 Boot Assist Module BAM MPC5602P Microcontroller Reference Manual Rev 4 848 Freescale Semiconductor ...
Страница 930: ...Chapter 36 Nexus Development Interface NDI MPC5602P Microcontroller Reference Manual Rev 4 930 Freescale Semiconductor ...