Dragon and AVRStudio 6 - won't program

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

I have a brand new AVRDragon - and a brand new AVRStudio 6.

The program recognises the Dragon - and I've updated the firmware using the Studio 6 - so everything is up to date.

But if I put in a MEGA328 which I know works - I have several (ATMEGA328-PU which is a 328, not a 328p) and though I can read the voltage, reading the device signature (or indeed trying anything else) returns, from what I can see on forums a fairly common message - "Unable to entre programming mode. Please verify..." etc.

In the output bottom of screen I'm getting "18:28:26: [ERROR] Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00, ModuleName: TCF (TCF command: Device:startSession failed.)"

I have the 40pin ZIF socket on the Dragon and I've lnked up correctly and tested with a meter to ensure the links are connected - no matter what I do I cannot get any further.

Any ideas anyone?

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

Two things

Atmel issued a DLL that fixed some problems with Dragon and AS6

The there is an update for AS6 available via extension manager that I think Kelso promised Dragon improvements.

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

More info - ISP mode, connections as per Studio 6 manual for device sheet SCKT3200D2... using the USB power. When I click the "device signature" button the 2 lights on he Dragon flash - but other than that it's as if there's no chip in there. No change of error message if I try with the chip out of the socket.

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

I've installed the extension manager update and the ARMGCC update. Can't find reference to DLL or any other updates.

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

Ok, so I'm fairly new to this (Dragon and AVR Studio) so take it easy with me guys... I spent hours this morning looking on the web to find countless people having problems with this. I got the scope out - and cheked the leaded from the Dragon board to the ZIF socket.. all looked fine - after all you're only talking 2 power leads and 3 signal leads. But no matter what, it would not read the device signature nor read the chip... nothing, dead.

In a wild moment of fantasy I wondered to myself why no clock source, how can it operate without a clock, so I stuck a 16 meg Xtal into the socket along with the 328 chip. Voila, everything works.... WHY? I can see no mention in the online Atmel help about needing an external clock when programming on the board as it were??

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

Quote:

. WHY? I can see no mention in the online Atmel help about needing an external clock when programming on the board as it were??

Suggests the chip fuses were in the non default state already.

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

scargill wrote:
In a wild moment of fantasy I wondered to myself why no clock source, how can it operate without a clock, so I stuck a 16 meg Xtal into the socket along with the 328 chip. Voila, everything works.... WHY? I can see no mention in the online Atmel help about needing an external clock when programming on the board as it were??

When the chips were in short supply (about a year ago), DIP mega328s were going to the Arduino market.

Arduino chips were pre-programmed with the bootloader. The fuses and lock bits set accordingly.

I guess that you have already erased the chip, which would have cleared the lock bits. However you need human input to alter the fuses.

Was BOOTRST set as well as 'Ext Crystal' ?

Every now and then people report virgin chips with 'Ext Crystal' clock fuses. I can only guess that they are stock originally destined for a big buyer.

Note that all the USB chips come with 'Ext Crystal' from the factory.

David.

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

So I don't understand.. if there is a possibility you might be putting chips in there which are already programmed for external Xtal - why don't Atmel in the docs say that you might need to attach an xtal when programming in the the programming area socket if you've fitted it - I spent hours on this..... and I'll bet I'm not the only one...???

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

Where did you buy your AVR(s) from?

What Atmel does and what shopkeepers do might be unrelated.

e.g. a customer wants an ATmega328P. The shop obtains a ATmega328P and sells it you.

Most hobbyists that want a ATmega328 want to use it in an Arduino. Most are grateful for a pre-programmed chip at no extra cost.

Yes. I can see that this has been very frustrating for you.
Of course my guesswork may be completely wide of the mark.

David.

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

Would have confused me, but then, I'm easily confused.

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

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

mailtosarathy wrote:
Try installing the Atmel Studio patch https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=122342

:)

I did that thanks - so all up to date, but in connection sheet still no reference to needing an external clock when using the prototyping area with a ZIF socket - and yet the only way I can program the 328 is by dropping in a 16 meg xtal into the socket along with the chip - surely that can't be right? Any chip that's been used in say an Ardiono project is likely to be set to external clock.

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

david.prentice wrote:
scargill wrote:
In a wild moment of fantasy I wondered to myself why no clock source, how can it operate without a clock, so I stuck a 16 meg Xtal into the socket along with the 328 chip. Voila, everything works.... WHY? I can see no mention in the online Atmel help about needing an external clock when programming on the board as it were??

When the chips were in short supply (about a year ago), DIP mega328s were going to the Arduino market.

Arduino chips were pre-programmed with the bootloader. The fuses and lock bits set accordingly.

I guess that you have already erased the chip, which would have cleared the lock bits. However you need human input to alter the fuses.

Was BOOTRST set as well as 'Ext Crystal' ?

Every now and then people report virgin chips with 'Ext Crystal' clock fuses. I can only guess that they are stock originally destined for a big buyer.

Note that all the USB chips come with 'Ext Crystal' from the factory.

David.

So are you saying that virgin chips out of the factory would normally be set to internal clock?

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

Quote:

So are you saying that virgin chips out of the factory would normally be set to internal clock?

From the factory they ALL are. However nothing stops a distributor or retailer then taking such chips and performing some kind of programming process on them (typically loading bootloader code, setting BOOTRST fuse and setting external clock fuses) and then selling the devices on as "Arduino chips".

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

Where did you buy your chip?
What were the fuses set for?

Yes. I would be annoyed if the chip does not obey the data sheet (i.e. supplied factory fuses for Internal RC)

Did the chip leave the factory in the wrong state ?
If so, ask for replacement(s).

Did the shop pre-program it for you ?
If the shop sold you a 'new' unprogrammed chip, ask for replacement(s).

David.

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

david.prentice wrote:
Where did you buy your chip?
What were the fuses set for?

Yes. I would be annoyed if the chip does not obey the data sheet (i.e. supplied factory fuses for Internal RC)

Did the chip leave the factory in the wrong state ?
If so, ask for replacement(s).

Did the shop pre-program it for you ?
If the shop sold you a 'new' unprogrammed chip, ask for replacement(s).

David.

They're so cheap - it's hardly worth it. I'd just hardwire a 16 meg xtal to the board but of course not all chips have them on the same pins. Shame they'd not though to give you a few spare unwired pins on the board... also - one might want to play with chips that have already been programmed and have external xtal. Thanks for the info however - at least now I know it's not a bust setup - would have been SOOOO much easier if ATMEL has just put a line on the bottom to say "chips set to external xtal will NOT program in the Dragon without an external Xtal connected" - instead of letting people waste hours.

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

Quote:

much easier if ATMEL has just put a line on the bottom to say

You still seem to be under the misapprehension that it's Atmel pre-programming the chips. It almost certainly is not. It'll be a distributor or retailer. So yes, whoever did the programming should have labelled the chips some how to show this had been done but don't be misled into thinking Atmel had a hand in it.

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

Where did you buy your chip?
What were the fuses set for?

I would agree that having access to a clock from the Dragon would be useful.
The STK500 or STK600 has both crystal oscillators and programmable clocks. Available on headers.

It looks as if there is a clock on pin#17 of the HV_PROG header. Personally, I have no intention of populating the 'prototype' area. IMHO, the Dragon is ideal for debugging or ISP/JTAG/PDI programming. Anything else like HVPP or HVSP is not worth the aggravation.

David.