четвер, 15 квітня 2010 р.

Initial program startup

Special routine is running prior to the starting ARM7TDMI in debugging mode. I've got this peace of code from Vasilis, who indicated they used it prior to making any measurements. So: what I have to do with this? No idea:


UNLOCK_VALUE EQU 0xA05F
LOCK_VALUE EQU 0xFFFF
HDR_OSC EQU 0x10000008
HDR_LOCK EQU 0x10000014
CLK50 EQU 0x0015C000
CLK20 EQU 0x00120000

SC_OSC EQU 0x11000004
SCLOCK EQU 0x1100001C
CLK_AP_30 EQU 0x70
CLK_AP_26 EQU 0x60


ENTRY
LDR r0,=HDR_LOCK
LDR r1,=UNLOCK_VALUE
STR r1,[r0]
LDR r2,=HDR_OSC
LDR r1,=CLK50
STR r1,[r2]
LDR r1,=LOCK_VALUE
STR r1,[r0]

LDR r0,=SCLOCK
LDR r1,=UNLOCK_VALUE
STR r1,[r0]
LDR r2,=SC_OSC
LDR r1,=CLK_AP_30
STR r1,[r2]
LDR r1,=LOCK_VALUE
STR r1,[r0]

END

Немає коментарів: