Motorola CML12S-DP256, MC9S12DP256 manual Memen, Ecs

Page 13

C M L 1 2 S D P 2 5 6

0 7 / 1 7 / 0 2

User application must perform all initialization including Stack setting, hardware startup, and external memory bus enable if needed, when the Autostart is applied. MON12 Ram Interrupt Vector table must also be applied in the same manner as under MON12 supervision or application interrupts will be trapped instead of serviced. See the CML12S.asm file for sample start-up initialization code.

Developing an application under MON12 or NOICE for Autostart should follow these steps:

1)Follow the MON12/ NOICE memory map and apply startup initialization and interrupt service routines in the 0x4000 - 0x7FFF memory area.

2)After development by applying ram memory program pages $20 - $2D, user should relocate the paged program code to internal flash pages $30 - $3D for programming into the flash memory. The user code in memory area 0x4000 - 0x7FFF will translate to the lower fixed flash page $3E for programming operations. User variables and stack, as well as interrupt vectors should stay in the internal ram area 0x1000 - 0x3E80 (monitor stack and variables not needed). Then set the Autostart vector for application launching.

3)If the Autostart application fails to start after programming, user should review all initialization and memory mapping first. Make sure the AUTO OFF (Spare) Option jumper is idle or open. If the application applies the XIRQ interrupt, the interrupt must be idle (high level) during any Reset sequence. Hardware may need to be applied if XIRQ signal level cannot be guaranteed high during Reset.

4)To perform a test Autostart and apply the external ram for program space the following precaution should be observed:

Expanded Wide Mode bus operation must be enabled from internal Ram space before access to the external ram can be performed. Use CML12S.asm file for an example and locate the PEAR/MODE Register write in internal ram space 0x1000 - 0x3F80. Program pages $20 - $2D should be applied. Code must be loaded and tested without powering down the development board (use Reset Switch).

OPTIONS and JUMPERS

MEM_EN

The MEM_EN option jumper is installed by default and enables the external ram memory on the expanded HCS12 address and data bus. Removing the MEM_CS option jumper will allow single-chip I/O port type operation of HCS12 ports A, B, E, and K (no bus enabled) without external memory interference.

ECS

The ECS option installed enables the Emulation Chip Select signal from the HCS12 to drive the upper address lines from HCS12 Port K to the external Ram on the CML12S board. With the option open or idle, only the linear 64K byte address map is available on the external address / data bus. ECS installed is required to emulate flash program pages in the external ram memory.

13

Image 13
Contents CML12S-DP256 Contents Getting Started Board Startup Installing the SoftwareSupport Software Modc = Out, JP2 = do not care, see COM PortsSoftware Development TutorialCreating Source Code AS12 HELLO.ASM -L Hello Assembling source codeRunning your application Auto Programming HCS12 Flash EEpromMON12 operation notes MON12 OperationMON12 Interrupt Support Mon12 Monitor CommandsMovw #IRQSRV,VIRQ MON12 and Noice Memory Map Noice OperationAutostart BDM OperationClock 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-LP1 P4 HCS12 Header Ring Lcdport ConnectorLcdport Test Points BDM PortSee the HC12 Technical Reference Manual for complete Documentation of the BDMTroubleshooting Tips and Suggestions Command LCD Command and Character CodesCode Delay MON12 Interrupt Table