On Mon, May 14, 2012 at 1:24 PM, simonqian.openocd
<[email protected]> wrote:

> BTW:
> I've updated the SWD speed using my SWD patch, it can be the same speed as
> JTAG:
> Info : device id = 0x10036414
> Info : flash size = 256kbytes
> stm32x mass erase complete
> Info : Padding image section 0 with 4 bytes
> Warn : no flash bank found for address 8040000
> wrote 262144 bytes from file Versaloon.hex in 7.988457s (32.046 KiB/s)
> dumped 32768 bytes in 0.471027s (67.937 KiB/s)
>
> ________________________________
Just wondering why the STM32 has such a poor flash write speed
no matter what I use. Is this the theoretical limit?

The dump speed seems to be quite low though. The following is
my test result with the git version (using an 6-year old PC running
Windows XP).

+++ openocd.cfg ++++
source [find interface/jtagkey2.cfg]
source [find target/stm32f1x.cfg]
#source [find board/stm32vldiscovery.cfg]

$_TARGETNAME configure -event reset-start {
 adapter_khz 1000
}

$_TARGETNAME configure -event reset-init {
 mww 0x40022000 0x32
 mww 0x40021004 0x3c0400
 mww 0x40021000 0x01000883
 sleep 10
 mww 0x40021004 0x3c0402
 sleep 10
 adapter_khz 8000
}

init
reset init
poll off
stm32f1x mass_erase 0
flash write_image LCD_demo.bin 0x08000000
verify_image LCD_demo.bin 0x08000000
dump_image dump_LCD_demo.bin 0x08000000 131072
verify_image dump_LCD_demo.bin 0x08000000
stm32f1x mass_erase 0
flash write_image dump_LCD_demo.bin 0x08000000
verify_image dump_LCD_demo.bin 0x08000000
load_image LCD_demo.bin 0x20000000 bin 0x20000000 20480
reset run
shutdown
+++++++

1) D2xx driver + libusb-win32 filter driver and vanilla git

This means I am using libftdi-0.20 and libusb-win32
driver. I also tested with using libusb-win32 device driver
mode and the speed is similar).

It seems 8MHz is not achieved in this case.

C:\work\openocd\openocd_win32_bin\bin>openocd.exe -f openocd.cfg
Open On-Chip Debugger 0.6.0-dev-00550-g4257cb7 (2012-05-12-22:58)
Licensed under GNU GPL v2
For bug reports, read
      http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Info : max TCK change to: 30000 kHz
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0x
ba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6
410, ver: 0x1)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: stm32f1x.cpu -- clearing lockup after double fault
Polling target failed, GDB will be halted. Polling again in 100ms
Polling succeeded again
1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0x
ba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6
410, ver: 0x1)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
7500 kHz
Info : device id = 0x20036410
Info : flash size = 128kbytes
stm32x mass erase complete
wrote 10048 bytes from file LCD_demo.bin in 0.453125s (21.655 KiB/s)
verified 10048 bytes in 0.234375s (41.867 KiB/s)
dumped 131072 bytes in 1.562500s (81.920 KiB/s)
verified 131072 bytes in 0.468750s (273.067 KiB/s)
stm32x mass erase complete
wrote 131072 bytes from file dump_LCD_demo.bin in 3.703125s (34.565 KiB/s)
verified 131072 bytes in 0.468750s (273.067 KiB/s)
10048 bytes written at address 0x20000000
downloaded 10048 bytes in 0.031250s (314.000 KiB/s)
1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0x
ba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6
410, ver: 0x1)
shutdown command invoked

-- 
Xiaofan

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to