⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ocdserv_eb42.dbs

📁 AT91M42800A-LEDSWING例子
💻 DBS
字号:
#--------------------------------------------------------------------------------------
#      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           : ocdserv_eb42.dbs
# Object              : Setup script for the Ateml AT91 board EB42 (Macraigor probes) 
#			with specifc board initialisation
#				- PLL
#				- EBI
#
# 1.0 22/Nov/02 JPP    : Creation 
#--------------------------------------------------------------------------------------
# Setup script for the Atmel AT91 board

# Setup script for the Atmel AT91 board
# This is only required if the Angel ROM monitor does not do the board setup

# first, tell the wiggler/raven to use a slow clock for JTAG
delay slow

#Disable External Watchdog assertion
memwrite long 0xffff8008 0x0

# At reset, the main clock is the output of the Slow clock oscillator, i.e 32,768KHz
# Set up the Clock frequency to run at 32,768 Mhz with PLLB / PLLCOUNT = 197 (6ms, 0xC5), 
# MUL=999(0x3E7), PLLB
memwrite long 0xffff4020 0xC503E708

# Wait for PMC_PLL_LOCK Bit in the PMC_SR equals 1.
sleep 1

# Commuting from Slow Clock (32,768Khz) to PLLB @32,768Mhz / PLLCOUNT = 197 (6ms, 0xC5), 
# MUL=999(0x3E7), CSS= PLL, PLLB
memwrite long 0xffff4020 0xC503E798

# Wait for the PLL is stabilized
sleep 1

# tell the wiggler/raven to resume using a fast clock
delay fast

# --------------------------------------------------------
# Now the Master clock is the output of PLL @ 32,768MHz -
# --------------------------------------------------------

# Set CPSR such that:
# Supervisor mode is on
# Thumb mode is off
# IRQ and FIQ interrupts are disabled
reg cpsr 0xd3

# 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
memwrite long 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
memwrite long 0xffe00004 0x02002121

# REMAP Done
memwrite long 0xffe00020 0x00000001

#2M bytes per Chip Select
memwrite long 0xffe00024 0x00000006

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -