Skip to content

Leonardo: after burning a sketch, remove the magic baud rate to avoid future unwanted board resets #103

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

Closed
wants to merge 2 commits into from

Conversation

PeterVH
Copy link

@PeterVH PeterVH commented Jul 10, 2012

An example of such an unwanted board reset happens if you burn ArduinoISP into a leonardo and subsequently want to use the leonardo to burn a bootloader into another avr chip.

See also: http://arduino.cc/forum/index.php/topic,108270.msg838797.html#msg838797

This is what happens, withou this modification:

  1. The ide resets the leonardo by "touching" the serial port: it sets DTR when the speed is 1200 baud.
    It does not use avrdude to do this.
  2. Avrdude downloads the sketch at the baudrate specified in boards.txt. When it is done, avrdude nicely sets the speed back to what it was before: 1200 baud.
    Then you decide to burn a bootloader to your target:
    3.The ide makes its first call to avrdude. Again, when avrdude is done, just before it closes the port it sets the speed back to what it was: 1200 baud. Closing the port toggles DTR and the leoardo reboots!
  3. The ide makes its second call to avrdude, but the leonardo is not yet up and you get the 'not in sync' error.

@ghost ghost assigned Fede85 Sep 5, 2012
@damellis
Copy link
Contributor

This has now been merged, but manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants