MPC566EVB Freescale Semiconductor, MPC566EVB Datasheet - Page 91

KIT EVALUATION FOR MPC565/566

MPC566EVB

Manufacturer Part Number
MPC566EVB
Description
KIT EVALUATION FOR MPC565/566
Manufacturer
Freescale Semiconductor
Datasheets

Specifications of MPC566EVB

Processor To Be Evaluated
MPC56x
Data Bus Width
32 bit
Interface Type
RS-232, Ethernet
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
3.5 System Call Functions
An additional utility within the dBUG firmware is a function called the System Call handler. This
function can be called by the user program to utilize various routines within dBUG, to perform a
special task, and to return control to dBUG. This section describes the System Call handler and
how it is used.
There are 6 System Call functions. These are: OUT_CHAR, IN_CHAR, IN_STAT,
ISR_REGISTER, ISR_REMOVE and EXIT_TO_dBUG. The system call interface accepts an
opcode in r10 to indicate which operation is to be performed. Various results are returned, usually
in r3. When these routines are invoked, the following is true: sprg0 contains r31 and sprg1 contains
LR.
3.5.1 OUT_CHAR
This function (function code 0x0020) sends a character, which is in r3, to terminal. The system call
interface accepts an opcode in r10 to indicate which operation is to be performed.
Assembly example:
C example:
3.5.2 IN_CHAR
This function (function code 0x0000) returns an input character (from terminal) to the caller. The
returned character is in r3.
Assembly example:
C example:
/* assume r3 contains the character */
addi r10, r0, 0x0020
sc
/* assume r3 contains the character */
void board_out_char (int ch)
{
}
/* the character is returned to the user in r3*/
addi r10, r0, 0x0000
sc
int board_in_char (void)
asm(“
asm(“
Chapter 3. Using the Monitor/Debug Firmware
Freescale Semiconductor, Inc.
For More Information On This Product,
Selects the function
addi r10, r0, 0x0020”); Selects the function
Selects the function
The character in r3 is sent to terminal
sc”);
The character is returned in r3
Go to: www.freescale.com
The character in r3 is sent to terminal
System Call Functions
3-39

Related parts for MPC566EVB