avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] avrdude + avrstudio / stk500 / ATMEGA162 - programming p


From: Steve Bentley
Subject: [avr-gcc-list] avrdude + avrstudio / stk500 / ATMEGA162 - programming problems
Date: Wed, 22 Dec 2004 12:57:16 +0100

Firstly, Thanks all for your help so far, unfortunately I'm not much
further but the help is appreciated.
Secondary, I'm not sure that this topic should be in the avrdude mailing
list due to the fact that I have problems programming the part with
AVRStudio as well. Please give advice which list (or both) is most
appropriate.

I received an email suggesting I try the following

>This matches the symptoms I was seeing with a mega48 when SCK was too
fast.  >What clock speed is your 162 running at?  The SCK period should
be greater >than 4 * system clock period.  There is an avrdude command
to set the SCK >period.

I'm using the clock source from the master controller on the stk500. The
XTAL1 jumper is connected which means that I am using the stk500
internal clock system and also OSCSEL is connected to 1+2. If I look at
some debug o/p from avrdude it states that the Osc is 3.686 MHz. The SCK
used is 1.1uS. I don't know how to check this in AVRStudio however.

>Brian Dean address@hidden wrote

>I had a very similar experience when using the very new AT90CAN128 chip
>with my STK500.  Note that when using the STK500, the raw memory
>instruction encoding are not used from the avrdude.conf file, but
rather >the STK500 implements these itself appropriate for the chip. If
your >firmware is old, the STK500 might not know about your the newer
chips.  I >recently updated the firmware in my STK500, the latest of
which seems to be >revision 1.18 and this fixed the issues with my
AT90CAN128 chip.  I'd say >try updating your STK500 firmware and see if
the problems are still >reproducable.

I updated AVRStudio (to 4.10) and this automatically upgraded the
firmware for the STK500 to 1.18. Unfortunately I got the same results.

After much searching I found this thread
http://www.mikrocontroller.net/forum/read-1-51373.html, the original
author seemed to have similar problems to me. The last post was on the
17th so I'm not sure if he solved his problem or not. I'll try posting
in there as well though.

My problems now though are the following:

Using avrdude

////
avrdude -p atmega162 -P com1     -c stk500  -v -v  -U flash:w:main.hex 

avrdude: Version 4.4.0
         Copyright (c) 2000-2004 Brian Dean, address@hidden

         System wide configuration file is "C:\WinAVR\bin\avrdude.conf"

         Using Port            : com1
         Using Programmer      : stk500
         AVR Part              : ATMEGA162
         Chip Erase delay      : 9000 us
         PAGEL                 : PD7
         BS2                   : PA0
         RESET disposition     : dedicated
         RETRY pulse           : SCK
         serial program mode   : yes
         parallel program mode : yes
         Memory Detail         :

                                     Page                       Polled
           Memory Type Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ------ ------ ---- ------ ----- ----- ---------
           flash       yes     16384  128   128  4500  4500 0xff 0xff
           eeprom      no        512    0     0  9000  9000 0xff 0xff
           lfuse       no          1    0     0 16000 16000 0x00 0x00
           hfuse       no          1    0     0 16000 16000 0x00 0x00
           efuse       no          1    0     0 16000 16000 0x00 0x00
           lock        no          1    0     0 16000 16000 0x00 0x00
           signature   no          3    0     0     0     0 0x00 0x00
           calibration no          1    0     0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500
         Hardware Version: 2
         Firmware Version: 1.18
         Vtarget         : 5.0 V
         Varef           : 5.0 V
         Oscillator      : 3.686 MHz
         SCK period      : 1.1 us

avrdude: stk500_program_enable(): failed to enter programming mode
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

make: *** [program] Error 1

////
Using AVRStudio

////
Programming Mode = ISP

Debug window: 
Detecting on 'Auto'...
STK500 found on COM1:
Getting revisions.. HW: 0x02, SW Major: 0x01, SW Minor: 0x12 .. OK

Clicking on PROGRAM, I received a generic error pop up window stating
problems occurred and check debug window:

Debug window:
Reading FLASH input file.. OK
Setting device parameters, parallel programming mode ..OK
Entering programming mode.. OK
Programming FLASH using block mode..       FAILED!
Leaving programming mode.. FAILED!

Reading the signature now I only receive 0xFF 0xFF 0xFF. I don't seem to
have the behaviour from before when random bytes are read.

Debug window:
Setting device parameters, parallel programming mode ..OK
Entering programming mode.. OK
Reading signature.. 0xFF 0xFF 0xFF .. OK
Leaving programming mode.. OK

The following lock bits are set:

Mode 1,
Application Protection Mode 1,
Bootloader protection Mode 1

If I click on read in this tab then the debug windows states that the
read was successfully but I'm suspicious of this.

In the Fuses tab:

Brown out disabled,
Boot flash section size = 128words
Ext Crystal Osc: Start-up time = 16K CK + 65ms.

If I play about trying to change the clock settings ten I receive the
following:

Setting device parameters, parallel programming mode ..OK
Entering programming mode.. OK
Programming fuses.. FAILED!
Leaving programming mode.. FAILED!


More ideas / suggestions welcomed.

One last question. Has anybody successfully programmed a 162 part USING
the stk500?

Thanks
Steve



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.820 / Virus Database: 558 - Release Date: 20.12.2004
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]