Electronic Components Datasheet Search
  English  ▼

X  

MAC7200 Datasheet(PDF) 556 Page - Freescale Semiconductor, Inc

Part # MAC7200
Description  MAC7200 Microcontroller Family Reference Manual
PDF  976 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  FREESCALE [Freescale Semiconductor, Inc]
Direct Link  http://www.freescale.com
Logo FREESCALE - Freescale Semiconductor, Inc

MAC7200 Datasheet(HTML) 556 Page - Freescale Semiconductor, Inc

Back Button MAC7200 Datasheet HTML 552Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 553Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 554Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 555Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 556Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 557Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 558Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 559Page - Freescale Semiconductor, Inc MAC7200 Datasheet HTML 560Page - Freescale Semiconductor, Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 556 / 976 page
background image
Initialization and Application Information
MAC7200 Microcontroller Family Reference Manual, Rev. 2
478
Freescale Semiconductor
writing a 1 to that TIF bit. To activate a timer interrupt it must also be switched from trigger mode into
interrupt mode, using the PITINTSEL register.
The timer interrupts are general-purpose interrupts.
26.10 Initialization and Application Information
26.10.1 Example Configuration
In the example configuration:
•
the PIT clock has a frequency of 50 MHz
•
the RTI clock has a frequency of 10 MHz
•
the RTI timer shall be set up to create a wakeup interrupt every 500 ms
•
timer 1 shall create an interrupt every 5.12 ms
•
timer 8 shall create a trigger event every 30 ms.
First the PIT module needs to be 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 and the 10 MHz frequency equates to a
clock period of 100 ns. Therefore the RTI timer needs to trigger every 500 ms/100 ns = 5000000 cycles,
timer 1 needs to trigger every 5.12 ms/20 ns = 256000 cycles and timer 8 every 30 ms/20 ns = 1500000
cycles. The value for the TVAL register trigger would be calculated as (period / clock period) -1.
This means that TVAL0 will be written with 004C4B3F hex, TVAL1 with 00003E7FF hex and TVAL8
with 0016E35F hex.
To generate the interrupt, the interrupt line must be enabled by writing a 1 to the RTIE bit in the PITINTEN
register. There is no need to modify PITINTSEL, as the RTI timer is always used for interrupts and never
for trigger events. To start the RTI, PEN0 in the PIT Timer Enable register 0 (PITEN0) is set.
The interrupt for Timer 1 is enabled by setting TIE1 in the PITINTEN register and the Interrupt/DMA
selector ISEL1 (in PITINTSEL) is set to 1. The timer is started by writing a 1 to bit PEN1 in the PITEN
register.
Timer 8 shall be used only for triggering. Only timers 0–4 have interrupt capability. Therefore Timer 8 is
started by writing a 1 to bit PEN8 in the PITEN1 register.
It is also possible to setup all timers and start them simultaneously by writing to the PITEN registers.
However the RTI still cannot start in synchronisation as it is running on a separate clock.
The following example code matches the described setup:
// turn on PIT
PIT_REG_P->pit_CTRL = 0x00;
// RTI
CRG_REG_P->crg_CTL
|= 1<<2;
// Set RTI bit in CLKSEL
PIT_REG_P->pit_TLVAL0 = 0x004C4B3F; // setup RTI for 5000000 cycles
PIT_REG_P->pit_INTEN = 0x00000001; // let RTI generate interrupts
// writing INTSEL is unnecessary
PIT_REG_P->pit_EN |= 1<<0; // start RTI



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com