5.1.3.4 Integration and application of the IPC
All interrupt inputs that comes from peripheral modules are synchronous signals. None of
the asynchronous signals of the interrupts are routed to IPC. The asynchronous signals of
the interrupts are routed directly to SIM module to wake system clocks in stop3 mode.
Additional care must be exercised when IRQ is reprioritized by IPC. CPU instructions
BIL and BIH need input from IRQ pin. If IRQ interrupt is masked, BIL and BIH still
work but the IRQ interrupt will not occur.
• The interrupt priority controller must be enabled to function. While inside an
interrupt service routine, some work has to be done to enable other higher priority
interrupts. The following is a pseudo code example written in assembly language:
INT_SER :
BCLR INTFLAG,INTFLAG_R ; clear flag that generate interrupt
. ; do the most critical part
. ; which it cannot be interrupted
.
.
.
CLI ; global interrupt enable and nested interrupt
enabled
. ; continue the less critical
.
.
.
BSET PULIPM, PULIPM_R ; restore the old IPM value before leaving
RTI ; then you can return
• A minimum overhead of six bus clock cycles is added inside an interrupt services
routine to enable preemptive interrupts.
• As an interrupt of the same priority level is allowed to pass through IPC to HCS08
CPU, the flag generating the interrupt must be cleared before doing CLI to enable
preemptive interrupts.
• The IPM is automatically updated to the level the interrupt is servicing and the
original level is kept in IPMPS. Watch out for the full (PSF) bit if nesting for more
than four levels is expected.
• Before leaving the interrupt service routine, the previous levels must be restored
manually by setting PULIPM bit. Watch out for the full (PSF) bit and empty (PSE)
bit.
5.2 IRQ
The IRQ (external interrupt) module provides a maskable interrupt input.
Chapter 5 Interrupt
MC9S08PT60 Reference Manual, Rev. 4, 08/2014
Freescale Semiconductor, Inc.
129
Содержание MC9S08PT60
Страница 2: ...MC9S08PT60 Reference Manual Rev 4 08 2014 2 Freescale Semiconductor Inc...
Страница 34: ...MC9S08PT60 Reference Manual Rev 4 08 2014 34 Freescale Semiconductor Inc...
Страница 40: ...System clock distribution MC9S08PT60 Reference Manual Rev 4 08 2014 40 Freescale Semiconductor Inc...
Страница 120: ...Flash and EEPROM registers descriptions MC9S08PT60 Reference Manual Rev 4 08 2014 120 Freescale Semiconductor Inc...
Страница 200: ...Port data registers MC9S08PT60 Reference Manual Rev 4 08 2014 200 Freescale Semiconductor Inc...
Страница 228: ...System clock gating control registers MC9S08PT60 Reference Manual Rev 4 08 2014 228 Freescale Semiconductor Inc...
Страница 262: ...Human machine interfaces HMI MC9S08PT60 Reference Manual Rev 4 08 2014 262 Freescale Semiconductor Inc...
Страница 298: ...Functional Description MC9S08PT60 Reference Manual Rev 4 08 2014 298 Freescale Semiconductor Inc...
Страница 396: ...FTM Interrupts MC9S08PT60 Reference Manual Rev 4 08 2014 396 Freescale Semiconductor Inc...
Страница 440: ...Functional description MC9S08PT60 Reference Manual Rev 4 08 2014 440 Freescale Semiconductor Inc...
Страница 468: ...Initialization Application Information MC9S08PT60 Reference Manual Rev 4 08 2014 468 Freescale Semiconductor Inc...
Страница 570: ...Application information MC9S08PT60 Reference Manual Rev 4 08 2014 570 Freescale Semiconductor Inc...
Страница 648: ...Memory map and register description MC9S08PT60 Reference Manual Rev 4 08 2014 648 Freescale Semiconductor Inc...
Страница 676: ...Resets MC9S08PT60 Reference Manual Rev 4 08 2014 676 Freescale Semiconductor Inc...