-
-
Notifications
You must be signed in to change notification settings - Fork 726
1200bps reset unreliable #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am also seeing this behaviour with the OS X 10.11.3, I think it is something do to with OS X USB CDC driver changes. When reading/writing to the programming port on the Zero I've seen the first byte getting drop after the 2nd sketch upload, but first upload after plugging in the board works all the time. I was not seeing this behaviour with OS X 10.10.x. It may or may not be related to this. |
This might be timing related, if I lower the tick count passed into I also tried disabling the CDC endpoint and pressing the reset button twice to enter boot loader mode, and did not see this issue
@pixelpixi this seems likely. @aethaniel any thoughts on this? This might be unrelated, but the OS X logs always have to following message anytime the boot loader is launched:
and the following after a sketch starts running:
|
I am no longer see this error when trying @facchinm's improvements in arduino/Arduino#4482. @pixelpixi it would be great if you could also downloaded the IDE build from arduino/Arduino#4482 (comment) and try it out on your Mac. |
I tried it and it works! Hurray! Thanks a lot. |
I may have spoken too soon. It appears to work consistently when connected directly to my computer, but when USB hubs are between my computer and the board it still fails. Perhaps the hubs affect how long it takes for the port to be initialized? |
Looks like this: |
@pixelpixi here's another IDE patch for you to try out: arduino/Arduino#4515 (comment) Without the change the IDE was only waiting 0.5s for the upload port to disappear and re-appear. I found it was taking ~850ms with OS X 10.11.3 and the Arduino Zero. The IDE patch bumps the wait period to 5s on all platforms. |
Okay, this is weird. With the new build ( PR-4515-BUILD-497 ) it works more reliably (though not 100% of the time) with USB hubs in between, but now fails consistently again when connected directly to the computer. |
@pixelpixi thanks for trying out the change.
I tested with a custom build of
Just wanted to confirm this happens with a Zero board and the boot loader from master? I can't reproduce with the boot loader from master, only with the modified boot loader from #106. |
I was testing with a modulo controller (which uses the arduino zero bootloader from a while back). I can test on a zero board using the bootloader from master if you think that's the problem, though. If I install the hourly build of the Arduino SAMD Boards package and then do "Burn Bootloader" will I get the right one? By the way, is there an easy way to use a local repo of the samd core? I always install the latest version, then move it out of the way, then create a symlink. (ie, mv 1.6.2 1.6.2.old; ln -s ~/ArduinoSamdCore 1.6.2). Maybe there's a better way to do it? Thanks! |
I tried installing the hourly build and burning the bootloader to the zero. It's still failing unfortunately. I'm unsure if I have the right version though. Is the version number that's printed when uploading the bootloader version? It says, "Version : v2.0 [Arduino:XYZ] Oct 10 2015 15:57:45" which sounds pretty old. |
I have a symlink to my Git checkout in
Ok, I'll spend some time looking at the boot loader, and let you know if I have a new version you can test. Does your Mac have USB 2.0 or USB 3.0 ports?
|
@pixelpixi here's another IDE build for you to try: arduino/Arduino#4515 (comment) I found if a |
I'm closing this arduino/Arduino#4515 has been merged and is available in the latest hourly build. |
When uploading using the native usb port, uploading fails every other time. I think that after the first failed upload the board is left running the bootloader, which is what allows the second attempt to succeed. This happens both with the arduino zero (native usb port) and my own modulo controller. It does not happen will non-samd boards such as the arduino micro.
Here's the sequence of events that I'm seeing:
Here's the output from a failed upload:
Is it possible that the bootloader takes too long to initialize the port and bossac runs before the port is ready?
Also I think this may have started happening after upgrading to OS X El Capitan. I haven't tested it on other operating systems but can do so if that's helpful.
Thanks a lot!
The text was updated successfully, but these errors were encountered: