Motorola CML12S-DP256, MC9S12DP256 manual MON12 Operation, MON12 operation notes

Page 9

C M L 1 2 S D P 2 5 6

0 7 / 1 7 / 0 2

MON12 OPERATION

Mon12 is an embedded monitor / debug utility that allows loading a compiled software program (S record) into Ram memory for testing and debug. The monitor may control the execution of the software by applying the SWI software interrupt service. Other features allow memory and register examination or modification.

Communication with the monitor is provided on the HCS12 SCI0 serial port or COM port on the development board. Default settings are 9600 baud with 8/n/1 bit settings. Flow control is not provided so the host PC communication software should be set to None or Hardware flow control. AxIDE utility software is recommended for use on a windows based host PC.

The monitor relies on resources from the HCS12 target to provide the monitor environment. The resources include 16K bytes of flash memory and 512 bytes of internal ram memory. The user must respect the monitor's memory map when applying the monitor to help debug code. Restricted memory areas:

Monitor Program space:

0xC000 - 0xFFFF Flash or Flash Page $3F.

Monitor Data space:

0x3E00 - 0x3FFF, Internal Ram.

Monitor Console:

COM Port and SCI0.

Monitor Autostart:

0xFEC - 0xFEF, Internal EEprom.

Monitor application provides for redirection of interrupt vectors through the ram based interrupt table, initialization of SCI0 serial port, initialization of HCS12 flash and EEprom programming clock rates, initialization of 8 MHz E clock from 4Mhz reference crystal, and detection of auto start enabled operation. The HCS12 memory map is fixed under monitor operation.

The monitor provides for interrupt vectors in the monitor data space from 0x3F8A - 0x3FFD. The vectors are in the same order as the default hardware table for the HCS12 located at address 0xFF8A - 0XFFFD (see table). The Reset vector is reserved, user should apply Auto Start for application starting from Reset.

MON12 operation notes:

1.CML12S-DP256 monitor application configures target HCS12 for 8MHz E clock, lower flash block (page $3E) disabled from memory map, and external access clock stretch set to 3 cycles. User can increase clock speed in application by modifying PLL control and setting new baud rate for serial port. Defaults will return whenever monitor is Reset.

2.Mon12 will not trace into interrupts. To trace an interrupt service set a breakpoint in the service routine and then trace.

3.Mon12 trace is limited to expecting the next linear address. Program counter modification, branches, calls, or subroutines will not trace correctly.

4.Monitor start-up procedure:

9

Image 9
Contents CML12S-DP256 Contents Getting Started Board Startup Installing the SoftwareSupport Software Modc = Out, JP2 = do not care, see COM PortsTutorial Software DevelopmentCreating Source Code AS12 HELLO.ASM -L Hello Assembling source codeRunning your application Auto Programming HCS12 Flash EEpromMON12 operation notes MON12 OperationMon12 Monitor Commands MON12 Interrupt SupportMovw #IRQSRV,VIRQ MON12 and Noice Memory Map Noice OperationBDM Operation AutostartClock frequency = 24MHz ECS MemenAuto OFF / spare ModcMode OscselTB1 and J1 Power Ports and ConnectorsJP1 and JP2 CUT-AWAY Options 1Analog Port McuportKeypad / Port H BusportPCOM1 and PCOM2 6 connected and 7,8 connectedPCOM2 pin connections Can PortCAN-H CAN-LLcdport Connector P1 P4 HCS12 Header RingLcdport Test Points BDM PortSee the HC12 Technical Reference Manual for complete Documentation of the BDMTroubleshooting Tips and Suggestions LCD Command and Character Codes CommandCode Delay MON12 Interrupt Table