?? mpserv_eb55_probe.dbs
字號(hào):
#--------------------------------------------------------------------------------------
# ATMEL Microcontroller Software Support - ROUSSET -
#--------------------------------------------------------------------------------------
# The software is delivered "AS IS" without warranty or condition of any
# kind, either express, implied or statutory. This includes without
# limitation any warranty or condition with respect to merchantability or
# fitness for any particular purpose, or against the infringements of
# intellectual property rights of others.
#--------------------------------------------------------------------------------------
# File Name : mpserv_eb55.dbs
# Object : Setup script for the Ateml AT91 board EB55 (Green Hills probes)
# with specifc board initialisation
# - PLL
# - EBI
#
# 1.0 21/Oct/02 JPP : Creation from ocd file
# 1.1 10/Feb/03 SC : Set the APMC_CGMR in known state before all.
# Modification a APMC Level => add "while" loop to check the Oscillator
# and PLL startup.
#--------------------------------------------------------------------------------------
# Firstly, we decrease the JTAG clock frequency to avoid bad reading in the case of the processor's clock
# is working at 32 kHz (only for the Green Hill Probe and not Slingshot). The use of the RTCK is not
# recommanded
set clock 10000
# Setup script for the Atmel AT91 board,
# jr => Reset the JTAG TAP controller. This step is necessary to set the ICE TAP in
# known state.
jr
# halt => Stop the processor if it is working.
halt
# =======================================================
# From 32 kHz Clock Frequency to 32MHz PLL output -
# =======================================================
#Set the APMC in default State without to know the initial value:
#The APMC_CGMR modification must be performed according to the
#data writen already.
#This script set the APMC_CGMR in the default state (known state)
#,i.e. 0x0., and step up the Clock Frequency.
# Switch from the PLL to the Main Oscillator
m 0xffff4020=0x032f4102
#Shut down the PLL
m 0xffff4020=0x032f4002
# Switch from the Main Oscillator to the Low Frequency Oscillator
m 0xffff4020=0x032f0002
# Initial state after the reset, i.e. APMC_CGMR = 0
m 0xffff4020=0x0
#-------------------------
# Main Oscillator Starting
#-------------------------
# This script is to speed up the System Frequency to run at 32MHz
# Enable the main oscillator (16Mhz) / MOSCEN = 1, OSCOUNT = 47 (1.4ms/30祍)
m 0xffff4020=0x002F0002
# Wait for Main oscillator stabilization. Wait for APMC_MOSCS Bit in APMC_SR equals 1.
moscs_checking=m 0xffff4030
while (moscs_checking != 1)
print The Main Oscillator is not ready !
moscs_checking=m 0xffff4030
endwhile
print OK, the Main Oscillator is ready now
print
# Switch from the Slow Clock source to the Main Oscillator (32K to 16Mhz)
m 0xffff4020=0x002F4002
#-------------
# PLL Starting
#-------------
#Setup the PLL / MUL = 1, PLLCOUNT = 3, CSS = 1
m 0xffff4020=0x032F4102
# Wait for the PLL is stabilized. Wait for APMC_PLL_LOCK Bit in APMC_SR equals 1
lock_checking=m 0xffff4030
while (lock_checking != 3)
print PLL is not ready
lock_checking=m 0xffff4030
endwhile
print OK, the PLL is ready now
print
# Switch from the Main Oscillator (16Mhz) to PLL output (32MHz) / CSS = 2, MUL = 1
m 0xffff4020=0x032F8102
# Now, the Green Hill Probe can work at full speed 8 MHz
set clock 8000000
# =======================================================
# Now the AT91M55800A is working at 32 MHz.
# EBI Setting
# =======================================================
if (m 0xffe00000 == 0x0000203d)
print AT91 reset
endif
print set the EBI value for load application
# EBI_CSR0 connected to the flash memory.
# Settings : EBI_BA=0x01000000 / EBI_CSEN / EBI_BAT_BYTE_WRITE / EBI_TDF_2 / EBI_PAGES_16M / EBI_NWS_3 / EBI_DBW_16
m 0xffe00000=0x01002529
# EBI_CSR1 connected to the External SRAM memory.
# Settings : EBI_BA=0x02000000 / EBI_CSEN / EBI_BAT_BYTE_WRITE / EBI_TDF_0 / EBI_PAGES_16M / EBI_NWS_1 / EBI_DBW_16
m 0xffe00004=0x02002121
# AT91 REMAP Done
m 0xffe00020=0x00000001
# 2M bytes per Chip Select
m 0xffe00024=0x00000006
print
# Get the Chip ID
print Chip ID
m 0xfff00000
print
# Get the Lists all breakpoints.
print Get the Lists all breakpoints.
bl
print Display current target status information.
ti
#set All register for RESET
reg r0 0x0
reg r1 0x0
reg r2 0x0
reg r3 0x0
reg r4 0x0
reg r5 0x0
reg r6 0x0
reg r7 0x0
reg r8 0x0
reg r9 0x0
reg r10 0x0
reg r11 0x0
reg r12 0x0
reg sp 0x0
reg lr 0x0
reg pc 0x0
# Set the mode register
reg cpsr 0xd3
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -