| Electronic Components Datasheet Search |
|
MAC7200 Datasheet(PDF) 929 Page - Freescale Semiconductor, Inc |
|
|
|||||||||||||||||||||||||||||
MAC7200 Datasheet(HTML) 929 Page - Freescale Semiconductor, Inc |
|
929 / 976 page ![]() Initialization/Application Information MAC7200 Microcontroller Family Reference Manual, Rev. 2 Freescale Semiconductor 851 — Read the IPR registers in the system interrupt controller to determine that the Port Integration Module caused the interrupt. If IPRH[29] is set, then there is an interrupt pending on one or more Ports. — Read the GLBLINT register to determine which Ports have interrupts pending. — Read the PORTIFR register for each port to determine which pin(s) have pending interrupts. Note that there may be multiple interrupts pending at any given time. 8. After the exact source(s) of the interrupt have been determined, the ISR should clear all pending interrupts by writing 0xFF to the PORTIFR register for each Port. In order to prevent any lost interrupts, you should do the read and clear of the PORTIFR register (or PIFR bit in the CONFIG register) for each port one port at a time (versus reading all PORTIFR registers, and then writing all PORTIFR registers). Example 34-6. Disable the eMIOS module and use all eMIOS pins as external interrupts. 1. Using Table 34-6, determine that the eMIOS pins are located on Port F0 to F7. 2. If required, disable the eMIOS module by writing to the appropriate register in the eMIOS register map (typically the MDIS bit). 3. Using Table 34-11, determine the addresses for Port F0 through F7 CONFIG registers to be ’Base + 0x140’ to ’Base + 0x14E’. 4. Use all pins as an input interrupt/wakeup signal with the following characteristics: — Active low interrupt with pull-up This gives a CONFIG register value of 0x000F (Write ’1’ to the PIFR register to ensure that any pending interrupts are cleared) 5. Write 0x000F to ’Base + 0x100’ through ’Base + 0x11E’. Use the following example code to do this: In File registers.h: #define PIM_BASE_ADDRESS 0xFC0E8000/* Example only ! */ /* Following example assumes short is 16-bits */ volatile unsigned short *CONFIG_F0 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0140); volatile unsigned short *CONFIG_F1 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0142); volatile unsigned short *CONFIG_F2 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0144); volatile unsigned short *CONFIG_F3 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0146); volatile unsigned short *CONFIG_F4 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x0148); volatile unsigned short *CONFIG_F5 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x014A); volatile unsigned short *CONFIG_F6 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x014C); volatile unsigned short *CONFIG_F7 = (volatile unsigned short *) (PIM_BASE_ADDRESS+0x014E); In File main.c: #include "registers.h" : : *CONFIG_F0 = 0x000F; *CONFIG_F1 = 0x000F; *CONFIG_F2 = 0x000F; *CONFIG_F3 = 0x000F; *CONFIG_F4 = 0x000F; *CONFIG_F5 = 0x000F; *CONFIG_F6 = 0x000F; *CONFIG_F7 = 0x000F; |
|
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 |
| 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 |