Database of reliable "delay" (from "File >> Preferences" menu)
August 25, 2010
Hello-
I am using a Maple Rev 3 (summer 2010) board with Maple-IDE 0.0.6 running on a 1 GHz Pentium III (512 meg RAM) system with Windows XP Professional SP3 and one USB 1.1 port.
I do not know how many developers are still using slow USB 1.1 ports on a Pentium III system, so I do not know how informative my problem is to other Maple developers. I have not updated my computer, because I like the 1400 X 1050 pixel resolution of a 14 inch screen. Good for seeing a lot of code on one screen.
I am still having trouble uploading sketches to FLASH memory, but this is not a long term solution because eventually my sketches will not fit into Maple RAM and I am reluctant to spend time porting my LabVIEW/Arduino code to the Maple unless I know my board is working 100%.
http://forums.leaflabs.com/topic.php?id=128
In an attempt to make it easier to trouble-shoot my Maple FLASH problem (and to help other users avoid the problem) I decided to find a way to reproducibly create an error message during a sketch upload to FLASH memory.
I decided to systematically change the "delay" setting accessed via the "File >> Preferences" menu.
I read that a setting of 600 ms works on a fast system (I assume with USB 2.0 ports). See
http://forums.leaflabs.com/topic.php?id=47
The problem experienced by member starbug seems similar to my problem. It is not clear if ??? found a permanent solution to the problem or a reasonable temporary fix.
Note: unlike my previous posts, in following the steps described in the summary (see below) I did not need to use the "perpetual bootloader mode" at all.
I assumed that by slowly increasing (or decreasing) the delay I would eventually reach a delay value where the upload would not work.
If the optimal delay is different, depending on cpu speeds/USB type/service pack, then it might be useful if the LeafLabs developers created a database on their web site which lists the delay different users have found to work reliably on their systems.
Unfortunately, as you can see below, the same delay which works successfully for me at one point results in a failure during a subsequent upload. Compare steps 36-40 (failure) and steps 42-46 (success).
Why is my Maple not behaving in a predictable way? What am I doing wrong?
Thanks!
Stephen from NYC
<start of summary>
01) set delay to 1200 ms, exit Maple-IDE, restart Maple-IDE, load Blink
02) reset two Blink delays to 2000 ms
03) set "Tools >> Board >> FLASH"
04) compile separately; upload into FLASH after compile is done
05) result: success
06) reset two Blink delays to 1000 ms
07) set "Tools >> Board >> RAM"
08) compile separately; upload into RAM after compile is done
09) result: success
10) conclusion: FLASH works
11) set delay to 1300 ms, exit Maple-IDE, restart Maple-IDE, load Blink
12) reset two Blink delays to 2000 ms
13) set "Tools >> Board >> FLASH"
14) compile separately; upload into FLASH after compile is done
15) result: success
16) reset two Blink delays to 1000 ms
17) set "Tools >> Board >> RAM"
18) compile separately; upload into RAM after compile is done
19) result: success
20) conclusion: RAM works
21) 1400 ms delay: uploading to FLASH works; uploading to RAM works
22) 1500 ms delay: uploading to FLASH works; uploading to RAM works
23) 1600 ms delay: uploading to FLASH works; uploading to RAM works
24) 1700 ms delay: uploading to FLASH works; uploading to RAM works
25) believe that sketch is not functioning correctly (blinking seems to remain at 1000 ms)
26) confirm belief by removing "LED on" line (after upload, blinking continues, meaning removing the code to turn on the LED does not affect the observed behavior)
27) I was expecting an error message or an unsuccessful load when the delay was too long
29) return to 1400 ms delay, but increase Blink timing to 3000 ms delay
30) 1400 ms delay: uploading to FLASH shows 1000 ms blink interval (modified code not working)
31) 1200 ms delay: uploading to FLASH still shows 1000 ms blink (modified code not working)
32) 1200 ms delay: uploading to RAM now shows 3000 ms blink (modified code working in RAM)
33) decrease Blink timing to 1000 ms delay
34) 1200 ms delay: uploading to RAM now shows 1000 ms blink (modified code working in RAM)
35) restart assessment: use 3000 and 1000 ms to distinguish between successful uploads to FLASH/RAM
36) set delay to 1300 ms, exit Maple-IDE, restart Maple-IDE, load Blink
37) reset two Blink delays to 3000 ms
38) set "Tools >> Board >> FLASH"
39) compile separately; upload into FLASH after compile is done
40) result: stops after line: "Starting download: ["
41) conclusion: upload to FLASH does not succeed with 1300 ms delay (steps 36-40) even though the same steps succeed with the same delay (steps 11-15).
42) keep delay to 1300 ms, exit Maple-IDE, restart Maple-IDE, load Blink
43) reset two Blink delays to 3000 ms
44) set "Tools >> Board >> FLASH"
45) compile separately; upload into FLASH after compile is done
46) result: success
47) conclusion: compare steps 36-40 and steps 42-46 (same procedure, but different results)
<end of summary>