?? ledswing_flash.dat
字號:
Com *--------------------------------------------------------------------------------------
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_flash.dat
Com *Object : script file for axd debugger
Com *
Com *1.0 18/Feb/03 JPP : Creation
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 Hereafter, $top_of_memory variable is defined at the top of the internal SRAM of the AT91R40008.
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
mem 0xffe00000,0xffe00010,32
Com =======================================================
Com From 32 kHz Clock Frequency to 32MHz PLL output -
Com =======================================================
Com Set the APMC in default State without to know the initial value:
Com The APMC_CGMR modification must be performed according to the
Com data writen already.
Com This script set the APMC_CGMR in the default state (known state)
Com ,i.e. 0x0., and step up the Clock Frequency.
Com Switch from the PLL to the Main Oscillator
setmem 0xffff4020 0x032f4102
Com Shut down the PLL
setmem 0xffff4020 0x032f4002
Com Switch from the Main Oscillator to the Low Frequency Oscillator
setmem 0xffff4020 0x032f0002
Com Initial state after the reset, i.e. APMC_CGMR = 0
setmem 0xffff4020 0x0
Com -------------------------
Com Main Oscillator Starting
Com -------------------------
Com This script is to speed up the System Frequency to run at 32MHz
Com Enable the main oscillator (16Mhz) / MOSCEN = 1, OSCOUNT = 47 (1.4ms/30祍)
setmem 0xffff4020 0x002F0002
Com Wait for Main oscillator stabilization. Wait for APMC_MOSCS Bit in APMC_SR equals 1.
mem 0xffff4030,0xffff4030,32
Com moscs_checking=m 0xffff4030
Com while (moscs_checking != 1)
Com print The Main Oscillator is not ready !
Com moscs_checking=m 0xffff4030
Com endwhile
Com echo OK, the Main Oscillator is ready now
mem 0xffff4030,0xffff4030,32
Com Switch from the Slow Clock source to the Main Oscillator (32K to 16Mhz)
setmem 0xffff4020 0x002F4002
Com -------------
Com PLL Starting
Com -------------
Com Setup the PLL / MUL = 1, PLLCOUNT = 3, CSS = 1
setmem 0xffff4020 0x032F4102 32
Com Wait for the PLL is stabilized. Wait for APMC_PLL_LOCK Bit in APMC_SR equals 1
mem 0xffff4030,0xffff4030,32
Com lock_checking=m 0xffff4030
Com while (lock_checking != 3)
Com print PLL is not ready
Com lock_checking=m 0xffff4030
Com endwhile
Com print OK, the PLL is ready now
mem 0xffff4030,0xffff4030,32
Com Switch from the Main Oscillator (16Mhz) to PLL output (32MHz) / CSS = 2, MUL = 1
setmem 0xffff4020 0x032F8102 32
Com Load file
ld ledSwing.axf
Com Clear All break
cbr all
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -