avrdude reset command

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

avrdude has control of the reset line through an impressive collection of supported programmers.

 

Is there a command (possibly undocumented) to make avrdude driving the reset line low and then high again?

 

Regards,

H.

This topic has a solution.
Last Edited: Thu. Sep 22, 2016 - 07:08 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrdude uses the DTR control signal of the serial port to reset the Arduino. If you just want to reset the Arduino using the command line, you just have to reprogram the DTR line (don't need avrdude). In windows (don't know how to do it in linux, should also be easy) this command will pulse DTR low, then high, causing a reset:

 

mode comX dtr=off

 

(comX is where the arduino is conected, like COM4)

 

edit: ok, this is in case you are using Arduino, or a usb to serial adapter where DTR is connected to reset, didn't test with any programmers.

Last Edited: Wed. Sep 21, 2016 - 07:40 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrdude has to reset the avr before it can do almost anything.

Reset has to be pulled low before a programming mode can be entered. (For ISP/SPI, Dun't know about debug wire or ....)

I use just a simple command to verify the fuses.

reset:	# The v in the fuse parameters is for verify, might fail, but resets anyway.
	avrdude -p $(MCU) -c usbasp -B300  -Ulfuse:v:0xE1:m	

 

 

 

 

 

 

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@ElTangas: Sorry, I do not know what Arduino is.   And I forgot what windows was....    Do I remember correctly that it was an OS used around Homo neanderthalensis times?

 

I was asking a question about avrdude.   Forgot to mention though that I am using an Atmel programmer connected via USB interface.

 

Paulvdh wrote:

I use just a simple command to verify the fuses.

 

Hi Paul,

 

I know that the reset is asserted for entering programming.   The only thing that surprises me is that some processors after programming do not start up properly, it seems randomly they are kept hanging in programming mode.    They are not left in a defined state.   

 

I'll have to try your fuse verify (or any other read access) if that fixes the problem reliably.   My preference would be a dedicated reset only without any sending of programming commands.   I might have to add that command myself.

 

Regards,

H.

Last Edited: Thu. Sep 22, 2016 - 06:14 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Paul,

 

your suggestion works fine.   Thank you very much !

 

Regards,

H.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Windows are usally a piece of glass in some kind of frame.

Sometimes you can open them to let some fresh air in. (Or noise, gasoline fumes, whatever).

They come in lots of varieties.

https://en.wikipedia.org/wiki/Wi...

 

 

 

 

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com