2016-01-27 08:10 AM
I have been using the STM32 Flashloader Demonstrator to read/write to/from an L151 MCU. It takes 58 seconds to read 391168 bytes from the MCU flash @ 115200. That is roughly twice what I would expect :
391168 x 9 (bits/byte) / 115200 = 30.56. Other baud rates yield similar results. I know there is overhead because each read can only do 255 bytes but doing the math it still doesn't account for this much difference. Is each data byte sent with its complement (similar to the command itself) ? It doesn't say it is in the AN3155 but I can't think of any other explanation for the transfer to take so long. Thanks.2016-01-27 08:14 AM
Did you count up the FLASH programming time?
[EDIT] Ah. *read*. Overlooked that, sorry. I don't have an answer, then. JW2016-01-27 08:19 AM
This was actually an upload. I have a programmed MCU that I am reading the reading the contents of the Flash from.
2016-01-28 06:15 AM
Dear Edge,
There may be few reasons of extra time-2016-01-28 11:08 AM
Thanks for your interest in my question. You're correct, I did not account for start and stop bits, but I did account for parity so if I change 9 to 11 bits/byte the time is 37.35 seconds. As I mentioned each read command can only transfer 255 bytes so it takes 1534 read commands from the host PC to transfer the data. The read command adds 11 bytes including acks back and forth for each request. That adds 1.6 seconds. That brings the total to about 40 seconds leaving about 18 seconds for FLASH read time, MCU instruction cycles, and host PC processing time. That seems high to me for that type of activity but as is being pointed out the little things add up. If anyone notices a big chunk contributor that I'm missing, please share. I appreciate your time and thoughts. Thanks.