M5249C3 Freescale Semiconductor, M5249C3 Datasheet - Page 54

KIT EVAL FOR M5249 W/ETHERNET

M5249C3

Manufacturer Part Number
M5249C3
Description
KIT EVAL FOR M5249 W/ETHERNET
Manufacturer
Freescale Semiconductor
Series
ColdFire®r
Type
Microprocessorr
Datasheets

Specifications of M5249C3

Contents
Module and Misc Hardware
Processor To Be Evaluated
MCF5249
Interface Type
RS-232, Ethernet
For Use With/related Products
MCF5249
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Using the Monitor/Debug Firmware
2.5
An additional utility within the dBUG firmware is a function called the TRAP 15 handler. This function
can be called by the user program to utilize various routines within the dBUG, to perform a special task,
and to return control to the dBUG. This section describes the TRAP 15 handler and how it is used.
There are four TRAP #15 functions. These are: OUT_CHAR, IN_CHAR, CHAR_PRESENT, and
EXIT_TO_dBUG.
2.5.1
This function ( function code 0x0013) sends a character, which is in lower 8 bits of D1, to terminal.
Assembly example:
C example:
void board_out_char (int ch)
{
#if
#else
#endif
}
2.5.2
This function (function code 0x0010) returns an input character (from terminal) to the caller. The returned
character is in D1.
Assembly example:
C example:
int board_in_char (void)
{
2-38
l
TRAP #15 Functions
/* assume d1 contains the character */
move.l
TRAP
/* If your C compiler produces a LINK/UNLK pair for this routine,
*/
/* LINK a6,#0 -- produced by C compiler */
asm (“ move.l8(a6),d1”);
asm (“ move.l#0x0013,d0”);
asm (“ trap#15”);
/* UNLK a6
/*
*/
asm (“ move.l#0x0013,d0”);
asm (“ trap#15”);
move.l
trap
asm (“ move.l#0x0010,d0”);
* then use the following code which takes this into account
*
asm (“ move.l4(sp),d1”);
OUT_CHAR
IN_CHAR
If C compiler does not produce a LINK/UNLK pair, the use
the following code.
#$0010,d0
#15
-- produced by C compiler */
#$0013,d0
#15
M5249C3 User’s Manual, Rev. 1
Select the function
Make the call, the input character is in d1.
/* select the function */
/* select the function */
Selects the function
The character in d1 is sent to terminal
/* put ‘ch’into d1 */
/* make the call */
/* put ‘ch’into d1 */
/* make the call */
/* select the function */
Freescale Semiconductor

Related parts for M5249C3