I’m using the following programmer: Pololu USB AVR Programmer to upload a binary code within a custom target board, but it stopped to work after the last revision at which I added the Watchdog reset functionality.
Once the target board do not have a physical Reset button, as well it is battery powered, I fear I’ll have to wait MONTHS until it get a power-off reset.
To turn around, I was wondering if there is any Pololu tool able to let me interactivelly handle the Reset signal, there is ?
Thanks in advance.
Reset the board by removing the batteries, and reinstalling them.
Ok, thanks for the reply, and sorry for not having mentioned before, but desoldering the battery is an issue at all and I should avoid as much as possible, and I was thinking of a soft way to do that, or rather, a ‘software’ way by handling the Reset signal through any Pololu application, if exists. The only tool I saw it was the ‘Configuration Utility’, which unfortunatelly do not have such a feature.
What do you mean by “it stopped to work”? Are you still able to upload code with your programmer?
The Pololu USB AVR Programmer resets the AVR as part of the procedure for programming it, so if you simply upload your code again, that should result in the AVR resetting.
If you want to reset the AVR without uploading any code, you can issue a command to read the device signature, which involves getting into programming mode and resetting the AVR. The way to do this depends on what programming software you are using. If you are using AVRDUDE, the command would be something like this:
avrdude -cstk500v2 -PCOM6 -patmega328p
You would need to change “COM6” and “atmega328p” to the appropriate values for your setup.
Atmel Studio also has a button in the “Device Programming” window for reading the device signature.
Another way to reset your AVR is to just connect the AVR’s reset line to GND for a moment. Those two lines are normally connected to the programmer, but you could disconnect them from the programmer and use a wire to connect them to each other.
No, it`s a bit weird.
From the last firmware I`ve uploaded, the target board stopped responding, and the programmer is not able to upload anything anymore, even attempting to upload a stable version to the target firmware. The only change I did in the firmware was the addition of a Watchdog reset upon reaching a forbdden condition.
I cannot think of any reason why adding code that causes a watchdog reset would prevent you from programming the AVR.
The “Troubleshooting” section of the Pololu USB AVR Programmer User’s Guide has advice that might help you figure out how to program your AVR again. If you would like further troubleshooting help after reading that section, please post pictures of your setup so I can check your connections, details about the AVR you are trying to program and what is connected to it, any error messages you get when trying to program, and a screenshot of the configuration utility when you have started it after an unsuccessful programming attempt.
Thanks for the continous support.
Concerning to the connecction itself, it is just the standard ISP signals ( MISO/ MOSI/ SCK/ RESET/ VDD/ GND) present on the connector, tied directly to a board self-powered with 3v. This board was not developed for me, and the only thing I felt as lacking it is a capacitor present on the RES\ signal. At the board there is only a 10K pull-up resistor there on the RESET signal.
Could you confirm if there is present internally at the POLOLU programmer, any capacitor at the RESET bus ?
Thanks in advance.
The programmer does not have a capacitor on its target reset line. A capacitor on the reset line is generally not needed; most of our AVR-based products do not have such a capacitor.
Concerning to the Reset capacitor, I think that although it is not mandatory al all, it is allways useful, parrticularly considering that the flat cable wirings comming from programmer connector acts as real antenna catching noise, and I strongly recommend you consider improving this at further revision of Pololu hardware.
Anyway, I think I’ve nailed the problem; please check if I took the correct assumption:
The board is self powered with 3v, but according to v1 USB AVR Pololu programmer’s specification, it is intended to use only with 5v compatible circuits, so I would gress that for some reason the whole process of programming was working so far by accident, I mean, out of specifications, therefore it was not guaranteed to work fine.
Is it correct?
- Firmware: 1.07
- S/N: 00182527
- Hardware version: F
- Software version 2A
A capacitor on the reset line, even if it’s just 0.1 µF, can cause the AVR’s debugWIRE interface to stop working, which is why the AVR datasheets (e.g. for the ATmega328PB) recommend disconnecting those capacitors while debugWIRE is in use. We will keep it in mind for future products, but we have not heard of any situations where someone actually needed a capacitor there.
AVR microcontrollers sometimes get corrupted and go into a bad state where they cannot be programmed if there are power issues during programming. Programming a 3.3 V AVR with a 5 V programmer like the Pololu USB AVR Programmer (product #1300) is out of spec, so you have been flirting with that kind of problem, and it’s possible that it caused something in your system to break even though it worked several times before.
You might consider getting our Pololu USB AVR Programmer v2.1 (product #3172), since it was designed to support programming 3.3 V or 5 V devices.
However, I think there is still some chance that you can get things working again if you follow the troubleshooting instructions I mentioned in an earlier post. In particular, the “Troubleshooting” section of the user’s guide mentions that if the target AVR is running at a voltage lower than 5 V, you may need to decrease the minimum allowed target VDD setting using the configuration utility. If you want further help troubleshooting, please read through that section of the user’s guide and provide all the infromation I asked for.