Epson S1C33 Computer Monitor User Manual


 
2 IMPLEMENTING THE DEBUG MONITOR
S1C33 FAMILY DEBUG MONITOR EPSON
OPERATION MANUAL
5
2.2 Starting Up the Debug Monitor
The debug monitor starts by jumping to m_mon_start( ).
Normally, provide a select switch outside the S1C33 chip for selecting either starting up the debug monitor or a
normal execution and create the program that can jump to m_mon_start( ) from the boot routine after an initial reset.
Furthermore, start the debug monitor after initializing the BCU if necessary. In case the debug monitor is started
before the BCU is initialized, downloaded data cannot be written to a 8-bit device or in DRAM. However, when the
S5U1C330M2S itself is placed on the 16-bit ROM and the 16-bit SRAM is used as a work area, it can be operated
even in the default setting (7-wait state) when operating in 20 MHz. In the following example, the initial set-up
statements are described as comments so that the BCU operates by default. By decreasing the wait cycle number
(2-wait setting in the example below), the file loading and other operations may improve the response time
(approximately 5 to 10%).
Example: boot routine of "dmt33004\m3s_boot.s"
;******************************************************************************
;
; BOOT program
;
;******************************************************************************
BOOT:
xld.w %r0,0x800
ld.w %sp,%r0
; xld.w %r5,BCU_A10_ADDR ;area9-10 (0x800000-0xffffff)
; xld.w %r4,0b0000000000010010 ;Device 16 bits,delay 1.5, wait 2
; ld.h [%r5]+,%r4
; xld.w %r5,BCU_A8_ADDR ;area8 (0x600000-0x7fffff)
; xld.w %r4,0b0000000000010010 ;Device 16 bits,delay 1.5, wait 2
; ld.h [%r5]+,%r4
; xld.w %r5,BCU_A5_A6_ADDR ;area5-6 (0x200000-0x3fffff)
; xld.w %r4,0b0001001000010010 ;Device 16 bits,delay 1.5, wait 2
; ld.h [%r5]+,%r4
xbtst [K6XD],0x3 ;K63 (debug SW check) 0:MON33 1:USER
xjreq m_mon_start ;MON33 start
jp USER
USER:
xld.w %r4,TBRP
xld.w %r6,0x59
xld.b [%r4],%r6 ;TTBR writable 0x59
xld.w %r4,TTBR
xld.w %r6,0x200000
ld.w [%r4],%r6 ;TTBR set 0x200000
ld.w %r4,[%r6]
jp %r4 ;user application(flash) start