![](http://datasheet.mmic.net.cn/370000/P9S12XEP100J1VVLR_datasheet_16728329/P9S12XEP100J1VVLR_217.png)
Chapter 3 Memory Mapping Control (S12XMMCV4)
MC9S12XE-Family Reference Manual Rev. 1.07
Freescale Semiconductor
217
3.4.4.1
Master Bus Prioritization regarding access conflicts on Target Buses
Thearbitrationschemeallowsonlyonemastertobeconnectedtoatargetatanygiventime.Thefollowing
rules apply when prioritizing accesses from different masters to the same target bus:
CPU always has priority over BDM and XGATE.
XGATE access to PRU registers constitutes a special case. It is always granted and stalls the CPU
for its duration.
XGATE has priority over BDM.
BDM haspriorityover CPUand XGATEwhenits accessis stalledformorethan 128cycles.Inthe
later case the suspect master will be stalled after finishing the current operation and the BDM will
gain access to the bus.
In emulation modes all internal accesses are visible on the external bus as well and the external bus
is used during access to the PRU registers.
3.5
Initialization/Application Information
3.5.1
CALL and RTC Instructions
CALL and RTC instructions are uninterruptable CPU instructions that automate page switching in the
program page window. The CALL instruction is similar to the JSR instruction, but the subroutine that is
called can be located anywhere in the local address space or in any Flash or ROM page visible through the
program page window. The CALL instruction calculates and stacks a return address, stacks the current
PPAGE value and writes a new instruction-supplied value to the PPAGE register. The PPAGE value
controls which of the 256 possible pages is visible through the 16 Kbyte program page window in the
64 Kbyte local CPU memory map. Execution then begins at the address of the called subroutine.
During the execution of the CALL instruction, the CPU performs the following steps:
1. Writes the current PPAGE value into an internal temporary register and writes the new
instruction-supplied PPAGE value into the PPAGE register
2. Calculates the address of the next instruction after the CALL instruction (the return address) and
pushes this 16-bit value onto the stack
3. Pushes the temporarily stored PPAGE value onto the stack
4. Calculates the effective address of the subroutine, refills the queue and begins execution at the new
address
This sequence is uninterruptable. There is no need to inhibit interrupts during the CALL instruction
execution. A CALL instruction can be performed from any address to any other address in the local CPU
memory space.
ThePPAGEvaluesuppliedbytheinstructionispartoftheeffectiveaddressoftheCPU.Foralladdressing
modevariations(exceptindexed-indirectmodes)thenewpagevalueisprovidedbyanimmediateoperand
in the instruction. In indexed-indirect variations of the CALL instruction a pointer specifies memory
locations where the new page value and the address of the called subroutine are stored. Using indirect
addressing for both the new page value and the address within the page allows usage of values calculated
at run time rather than immediate values that must be known at the time of assembly.