EmbeddedRelated.com
Forums
Memfault Beyond the Launch

AVR IPS programming problems

Started by Meindert Sprang October 4, 2004
Hi all,

I have a very annoying problem: I have an existing design with an
ATmega8515, with an ISP connector setup as specified in one of the Atmel
appnotes about implementing an ISP connector. It uses a network on the reset
line, with a 10k resistor to VCC, a 4n7 cap to ground and a diode across the
resistor for protection. This has always worked on a 2313, a 8515 and a
Mega8515. I recently upgraded the design to a Mega162 and since then 1 out
of three times the board refuses to have the configuration fuses programmed.
Also reading the chip ID gives random results many times. Once the fuses are
programmed successfully (to use an external crystal at 8MHz), everything
runs fine and the code can be programmed too.

Can anyone shed some light on this?

Meindert


Meindert Sprang wrote:

> Hi all, > > I have a very annoying problem: I have an existing design with an > ATmega8515, with an ISP connector setup as specified in one of the Atmel > appnotes about implementing an ISP connector. It uses a network on the reset > line, with a 10k resistor to VCC, a 4n7 cap to ground and a diode across the > resistor for protection. This has always worked on a 2313, a 8515 and a > Mega8515. I recently upgraded the design to a Mega162 and since then 1 out > of three times the board refuses to have the configuration fuses programmed. > Also reading the chip ID gives random results many times. Once the fuses are > programmed successfully (to use an external crystal at 8MHz), everything > runs fine and the code can be programmed too. > > Can anyone shed some light on this?
I'm using a similar network, 10k up, 100nF to GND and 100 Ohm to the ISP. Hmm, the lot runs on 5V or perhaps lower ? I once found that there is some bit timing, which is dependent on the voltage. While at 5v is was 3ms per bit, it increased to 9ms at 3.3V or so. The programmer, in my case the Equinox from Meridian has the short value fixed. Fortunately, it was editable somewhere in the options. Took me a day. We also had problems with the Mega 163, they got better once we moved to the 323 and now at the Mega32 there weren't any yet. As of the Mega162 I know nothing. Rene -- Ing.Buero R.Tschaggelar - http://www.ibrtses.com & commercial newsgroups - http://www.talkto.net
"Rene Tschaggelar" <none@none.net> wrote in message
news:41614849$0$23954$5402220f@news.sunrise.ch...
> > I'm using a similar network, 10k up, 100nF to GND and 100 Ohm > to the ISP. > > Hmm, the lot runs on 5V or perhaps lower ?
Everything runs at 5V.
> I once found that there is some bit timing, which is dependent on > the voltage. While at 5v is was 3ms per bit, it increased to 9ms > at 3.3V or so. The programmer, in my case the Equinox from > Meridian has the short value fixed. Fortunately, it was editable > somewhere in the options. Took me a day.
I'm using the STK500 utility from Atmel. No timings to set. I cannot find anything about it on Atmel's website either. I'll try an upgrade of AVRStudio in the next couple of days. Meindert
On Mon, 4 Oct 2004 15:04:14 +0200, "Meindert Sprang" <mhsprang@NOcustomSPAMware.nl> wrote:

>"Rene Tschaggelar" <none@none.net> wrote in message >news:41614849$0$23954$5402220f@news.sunrise.ch... >> >> I'm using a similar network, 10k up, 100nF to GND and 100 Ohm >> to the ISP. >> >> Hmm, the lot runs on 5V or perhaps lower ? > >Everything runs at 5V. > >> I once found that there is some bit timing, which is dependent on >> the voltage. While at 5v is was 3ms per bit, it increased to 9ms >> at 3.3V or so. The programmer, in my case the Equinox from >> Meridian has the short value fixed. Fortunately, it was editable >> somewhere in the options. Took me a day. > >I'm using the STK500 utility from Atmel. No timings to set. I cannot find >anything about it on Atmel's website either. I'll try an upgrade of >AVRStudio in the next couple of days. > >Meindert >
Try PonyProg from www.lancos.com
"dmm" <dmmilne_removethis_@ozemail.com.au> wrote in message
news:3pj2m05gecomonlpmc2ubn5h1rabugcljd@4ax.com...

> Try PonyProg from www.lancos.com
Wouldn't it be logical that the tools from Atmel would work? :-) Meindert
Hi Meindert,

> Mega8515. I recently upgraded the design to a Mega162 and since then 1 out > of three times the board refuses to have the configuration fuses programmed.
Just a thought - Is your STK500 using the latest latest firmware as included with the latest build of AVR Studio?
"Lewin A.R.W. Edwards" <larwe@larwe.com> wrote in message
news:608b6569.0410041006.49d068d7@posting.google.com...
> Hi Meindert, > > > Mega8515. I recently upgraded the design to a Mega162 and since then 1
out
> > of three times the board refuses to have the configuration fuses
programmed.
> > Just a thought - Is your STK500 using the latest latest firmware as > included with the latest build of AVR Studio?
I'm not quite sure. I haven't downloaded the latest version yet, so that might be the problem. The STK500 utility itself is V1.40. I'll check that anyway. Thanks for the hint. Meindert
Meindert Sprang wrote:

> "dmm" <dmmilne_removethis_@ozemail.com.au> wrote in message > news:3pj2m05gecomonlpmc2ubn5h1rabugcljd@4ax.com... > > >>Try PonyProg from www.lancos.com > > > Wouldn't it be logical that the tools from Atmel would work? :-)
Not necessarily. Similar to Microchip, software is not thir business. It took Microchip about 10 years after the release of 23bit windows to come out with a 32bit MPLAB. Just in case : There is a Pascal compiler for the AVR that comes with programmer. http://www.e-lab.de , including libraries, forum and the lot. Rene -- Ing.Buero R.Tschaggelar - http://www.ibrtses.com & commercial newsgroups - http://www.talkto.net
On Monday, in article
     <4161940c$0$23961$5402220f@news.sunrise.ch> none@none.net
     "Rene Tschaggelar" wrote:

>Meindert Sprang wrote: > >> "dmm" <dmmilne_removethis_@ozemail.com.au> wrote in message >> news:3pj2m05gecomonlpmc2ubn5h1rabugcljd@4ax.com... >> >> >>>Try PonyProg from www.lancos.com >> >> >> Wouldn't it be logical that the tools from Atmel would work? :-) > >Not necessarily. >Similar to Microchip, software is not thir business. >It took Microchip about 10 years after the release of >23bit windows to come out with a 32bit MPLAB.
^^^^^ That is the best unintentional description I have come across for ages :-^ -- Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.gnuh8.org.uk/> GNU H8 & mailing list info <http://www.badweb.org.uk/> For those web sites you hate
Meindert Sprang wrote:

> Hi all, > > I have a very annoying problem: I have an existing design with an > ATmega8515, with an ISP connector setup as specified in one of the > Atmel appnotes about implementing an ISP connector. It uses a > network on the reset line, with a 10k resistor to VCC, a 4n7 cap to > ground and a diode across the resistor for protection. This has > always worked on a 2313, a 8515 and a Mega8515. I recently upgraded > the design to a Mega162 and since then 1 out of three times the > board refuses to have the configuration fuses programmed. Also > reading the chip ID gives random results many times. Once the fuses > are programmed successfully (to use an external crystal at 8MHz), > everything runs fine and the code can be programmed too. > > Can anyone shed some light on this? > > Meindert
Hi Meindert, the problem could be the SPI timing. The mega162 runs at 1MHz when the fuses are not programmed. There is a command in the STK500 protocol to slow down the SPI. However, I don't know about the STK500 utility, because I use Linux. /Jan-Hinnerk

Memfault Beyond the Launch