X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=tcl%2Fboard%2Fat91cap7a-stk-sdram.cfg;h=9bc02e8c0383bd563d1cda73202112c6dbf7bc2c;hb=101124c69af0cf1546e7f0aa2606e36c3c8743eb;hp=cca12119cb1077f42149b0b69427237e82e9e9fc;hpb=8f779cf66bf459616b7dad88e871c2f4a7315371;p=openocd.git diff --git a/tcl/board/at91cap7a-stk-sdram.cfg b/tcl/board/at91cap7a-stk-sdram.cfg index cca12119cb..9bc02e8c03 100644 --- a/tcl/board/at91cap7a-stk-sdram.cfg +++ b/tcl/board/at91cap7a-stk-sdram.cfg @@ -15,7 +15,7 @@ if { [info exists ENDIAN] } { set _ENDIAN little } -if { [info exists CPUTAPID ] } { +if { [info exists CPUTAPID] } { set _CPUTAPID $CPUTAPID } else { set _CPUTAPID 0x40700f0f @@ -24,11 +24,11 @@ if { [info exists CPUTAPID ] } { jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi +target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME $_TARGETNAME configure -event reset-start { # start off real slow when we're running off internal RC oscillator - jtag_khz 10 + adapter_khz 32 } proc peek32 {address} { @@ -76,6 +76,10 @@ $_TARGETNAME configure -event reset-init { wait_state {expr {([peek32 0xFFFFFC68] & 0x8) == 0}} echo "Master clock ok." + + # Now that we're up and running, crank up speed! + global post_reset_khz ; adapter_khz $post_reset_khz + echo "Configuring the SDRAM controller..." # Configure EBI Chip select for SDRAM @@ -149,10 +153,6 @@ $_TARGETNAME configure -event reset-init { mww 0xffffef00 0x3 echo "SDRAM configuration ok." - - # Now that we're up and running, crank up speed! - global post_reset_khz - jtag_khz $post_reset_khz } $_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0