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

📄 ledswing_ice.dat

📁 ATMEL AT91RM9200开发板配套光盘上的全部示例程序
💻 DAT
字号:
Com *     ATMEL Microcontroller Software Support  -  ROUSSET  -
Com *--------------------------------------------------------------------------------------
Com *The software is delivered "AS IS" without warranty or condition of any
Com *kind, either express, implied or statutory. This includes without
Com *limitation any warranty or condition with respect to merchantability or
Com *fitness for any particular purpose, or against the infringements of
Com *intellectual property rights of others.
Com *--------------------------------------------------------------------------------------
Com *File Name               : File LedSwing_ICE.dat
Com *Object                  : Script file for axd debugger
Com *
Com *1.0 18/Feb/03   JPP     : Creation
Com *1.1 24/Mar/03   SC      : Modification of the top_of_memory value and general script
Com *			     : to configure the PMC in all case (this script can be used
Com *			     : when the board has no boot-up program in its Flash
Com *--------------------------------------------------------------------------------------

Com # --------------------------------------------------------
Com # Setting of Debugger's variables
Com # --------------------------------------------------------

Com Enable the semihosting. If you don't use printf and/or scanf functions, set semihosting_enabled to 0.
spp semihosting_enabled 1

Com Define the top of memory to store the buffer for semihosting calls.
Com Needed when working with an ICE Interface and if you use C printf/scanf functions in your code.
Com The value after $top_of_memory variable is the address of the buffer needed for the semihosting.
Com Generally pointing to the top of Internal or External Memory. Change it according to your board configuration.
Com For the AT91R40008,the $top_of_memory variable is defined at the top of the internal SRAM.

Com The top of the external memory size is [(NCS1=0x2000000) + (2x128k=0x40000)]
let $top_of_memory 0x02040000

Com Disable all vector catch to not have AXD to warn you that a vector exception has been caught.
spp vector_catch 0x0 


Com Disable External Watchdog assertion
Com The Watchdog is enabled after the power-up on the AT91M42800A microcontroller
setmem 0xffff8008 0x32

Com # --------------------------------------------------------
Com # Configure the Power Management Controller to speed up  -
Com # --------------------------------------------------------

Com There are two case:
Com - this script is performed but the microcontroller has been configured already,
Com - this script is performed and the microcontroller has not been configured.
Com At reset, the main clock is the output of the Slow clock oscillator, i.e 32,768kHz
Com Set up the Clock frequency to run at 32,768 Mhz with PLLB / PLLCOUNT = 197 (6ms, 0xC5), 
Com MUL=999(0x3E7), PLLB
Com IMPORTANT: The "PLLS" field, in the PMC_CGMR register, can be modified once. It is 
Com important to set this bit in the first write

setmem 0xffff4020 0xC503E718 32

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

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

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

Com Setup EBI to support all connected memories
Com Setup for EB40A with external Flash memory only. Change the EBI value (i.e number of wait states, TDF, 8 or 16-bit memory, etc..
Com according to your external memories and peripherals.
Com You can add other EBI Chip Select setting to fit your board configuration.
Com EBI_CS0 for Flash access

Com print set the EBI value for load application
Com EBI_CSR0 connected to the flash memory.
Com Settings : EBI_BA=0x01000000 / EBI_CSEN / EBI_BAT_BYTE_WRITE / EBI_TDF_2 / EBI_PAGES_16M / EBI_NWS_3 / EBI_DBW_16
setmem 0xffe00000 0x01002529 32

Com EBI_CSR1 connected to the External SRAM memory.
Com Settings : EBI_BA=0x02000000 / EBI_CSEN / EBI_BAT_BYTE_WRITE / EBI_TDF_0 / EBI_PAGES_16M / EBI_NWS_1 / EBI_DBW_16
setmem 0xffe00004 0x02002121 32

Com AT91 REMAP Done
setmem 0xffe00020 0x00000001 32

Com 2M bytes per Chip Select
setmem 0xffe00024 0x00000006 32

Com Get the Chip ID
print Chip ID
mem 0xfff00000,0xfff00000,32

Com Load file
ld ledSwing.axf

⌨️ 快捷键说明

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