测试日期:2009.05.16
测试人员:McuIsp
测试ISP对象:万利199板EK-STM32F,STM32F103VBT6
测试工具:USB-串口线,PL2303芯片。
测试软件:mcuisp,手持万用在线编程机STM32F ISP固件。
测试结果:
测试结论:
1、ISP最高速度为15KB/S左右。写FLASH速度52.5us/2字节,折算为38KB/S。可见还是有改进空间。
2、RamIsp在高速921600时,反而落后STM32的原协议,是因为有加密运算。去除加密运算,并把通讯和写片并行化的话,可逼近38KB/S的理论速度。
3、手持机能通过提高波特率达到最高的ISP速度。
4、PC提高波特率,ISP速度无显著提高。
PC提高Baudrate的话,速度有也明显提高,按照我这里的测试条件。
我在自己做的CDC设备上测试的结果:
921600下,PC+CDC+Cmos串口,最快速度将近16K:
writing flash |========================================%100| 0.38s used
Info: flash programmed for 6208bytes
115200下,速度大概6K多:
writing flash |========================================%100| 0.95s used
Info: flash programmed for 6208bytes
使用PC+OpenOCD+JTAG的速度大概在12K-13K,以前测试的,使用最新版本的OpenOCD。
可能跟USB串口线有关系。
手头有FTDI的USB串口模块,有时间测试一下。
另请问钱兄,你的ISP带了回读校验么?
带回读的话,460800下:
H:\MyProject\Versaloon\Open\FW_Final\Project>vsprog -ccomisp_stm32 -C "COM4:4608
00 8E1 NN" -i"H:\MyProject\Versaloon\Versaloon_Nano_IAR.hex" -oe -owf -ovf
VSProg 1.0 (2009-05-17-18:02) svn:3:8M
CopyRight(c) 2008-2009 by SimonQian <SimonQian__AT__SimonQian__DOT__com>
URL: http://www.SimonQian.com/en/Versaloon
mail: SimonQian__AT__SimonQian__DOT__com
Warning:5 is invalid for hex type, current line ignored!!
Info: Bootloader version 2.2 detected
Info: Product id = 0x1004
Info: Flash memory size: 64 KB, SRAM memory size: 65535 KB
Info: erasing chip
erasing chip |========================================%100| 0.03s used
Info: chip erased
Info: programming flash
writing flash |========================================%100| 2.03s used
Info: flash programmed for 26941bytes
Info: verifying flash
reading flash |========================================%100| 1.16s used
Info: flash verified for 26941bytes
平均速度8KB/s多。
115200下:
H:\MyProject\Versaloon\Open\FW_Final\Project>vsprog -ccomisp_stm32 -C "COM4:1152
00 8E1 NN" -i"H:\MyProject\Versaloon\Versaloon_Nano_IAR.hex" -oe -owf -ovf
VSProg 1.0 (2009-05-17-18:02) svn:3:8M
CopyRight(c) 2008-2009 by SimonQian <SimonQian__AT__SimonQian__DOT__com>
URL: http://www.SimonQian.com/en/Versaloon
mail: SimonQian__AT__SimonQian__DOT__com
Warning:5 is invalid for hex type, current line ignored!!
Info: Bootloader version 2.2 detected
Info: Product id = 0x1004
Info: Flash memory size: 64 KB, SRAM memory size: 65535 KB
Info: erasing chip
erasing chip |========================================%100| 0.03s used
Info: chip erased
Info: programming flash
writing flash |========================================%100| 4.17s used
Info: flash programmed for 26941bytes
Info: verifying flash
reading flash |========================================%100| 3.30s used
Info: flash verified for 26941bytes
平均速度为3.5KB/s。
这个看来和CDC设备的性能有关了,以后有空的话给CDC做一个优化试试,目前CDC和ARM_JTAG调试可以同时使用,所以没有办法太优化。
不明白为什么你这里测试的波特率相差4倍,结果没有什么太大的差别,个人觉得很可能是哪个CDC的问题。
H:\MyProject\Versaloon>vsprog -ccomisp_stm32 -C "COM4:921600 8E1 NN" -ia.hex -oe
-owf -ovf
VSProg 1.0 (2009-06-02-06:37) svn:3:10M
CopyRight(c) 2008-2009 by SimonQian <SimonQian@SimonQian.com>
URL: http://www.SimonQian.com/en/Versaloon
mail: SimonQian@SimonQian.com
Warning:5 is invalid for hex type, current line ignored!!
Info: Bootloader version 2.0 detected
Info: Product id = 0x41004106
Info: Flash memory size: 32 KB, SRAM memory size: 6 KB
Info: erasing chip
erasing chip |========================================%100| 0.03s used
Info: chip erased
Info: programming flash
writing flash |========================================%100| 1.59s used
Info: flash programmed for 26941bytes
Info: verifying flash
reading flash |========================================%100| 0.75s used
Info: flash verified for 26941bytes
921600下,平均速度为11KB/s,这个速度还算没落后太多。可惜STM32_ISP不支持921600以上的速度了。