avrdudes / avrdude

AVRDUDE is a utility to program AVR microcontrollers
GNU General Public License v2.0
728 stars 137 forks source link

[bug #34281] Wrong Chip ID# #233

Closed avrs-admin closed 2 years ago

avrs-admin commented 2 years ago

Brian Stott Tue 13 Sep 2011 10:53:40 AM UTC

When used with Atmel Manfacturer's Chip - this case Atmega328P the avrdude application is hard coded to compare reported chip ID with inaccurate ID(s).

Example: avrdude.exe: Device signature = 0x1e9514 avrdude.exe: Expected signature for ATMEGA328P is 1E 95 0F

This is not an uncommon problem.

I'm not a programmer and am not skilled to muck for the code lines in the source and to recompile for removal of chip ID check or to add/correct the search compare feature.

I've 6 chips to program. This is a stop gap. Please expedite. I've seen others have had this issue for years.

Thanks for sharing your good tool for our learning and hobby efforts.

Brian Stott (Pittsburgh, PA)

This issue was migrated from https://savannah.nongnu.org/bugs/?34281

avrs-admin commented 2 years ago

Joerg Wunsch Tue 13 Sep 2011 11:47:57 AM UTC

What programming device are you using, what exact commandline?

It's likely you are simply overdriving your ISP clock.  With most AVR's default 1 MHz CPU clock, the ISP clock must be below 250 kHz.

avrs-admin commented 2 years ago

jonathan nifenecker Tue 13 Sep 2011 11:59:22 AM UTC

From the datasheet, 0x1e9514 is the correct device signature of the atmega328, not the atmega328p. And the atmega328 part definition doesn't exist.

avrs-admin commented 2 years ago

Joerg Wunsch Tue 13 Sep 2011 12:02:11 PM UTC

In that case, it would be sufficient to override the ID check by using the -F option.

avrs-admin commented 2 years ago

Brian Stott Tue 13 Sep 2011 01:17:19 PM UTC

Solution: The offending/difficult line is in 'avrdude.conf'.

There is a callout in the specific chip information block: "signature        = XXXXXXXX;" I changed this signature to match the physical chip ID. This error is gone and avrdude now returns the following statement.: "avrdude.exe: Device signature = 0x1e9514"

Request: Adjust avrdude source to accept multiple IDs for a single device separated by comma ',' Or make the signature generic and/or optional.

Thank you for your responses.

Since I don't use CLI tools anymore (10yrs+) or program the solution was a little elusive.

Reply to suggestions -

ISP Clock is irrelevant to chip ID. Right? I'm not sure. I'd used various ranges on -B and -b from 1-4800. My chip is wired with external 16Mhz crystal.

I found that the programming device was of no matter. I'd used several with the same result. I'd also seen in other forums the same results of others using programmers other than the ones I tested. My Devices - USBasp, Arduino Duemilanove as AVR programmer, [Two FT232RL]FTDI bitbang method, FTDI friend clone (serial programmer).

I'd also looked at the datasheet. Kinda irrelevant too. Several events are working here. (1) avrdude is distributed with configs and sources. (2) Mfg. Documentation is distributed. (3) Chips are ID'd. --- They appear to not always be in sync?

Effect on: All avrdude - the problem propagates from the original to the variants.

Avrdude varieties used: avrdude (direct download), Arduino (included), WinAVR, and avrdude-serjtag. All gave same ID error.

Invoking switch '-F' had no effect. I had the '-F' option invoked.

avrs-admin commented 2 years ago

Brian Stott Tue 13 Sep 2011 01:20:52 PM UTC

Sorry Jason ---- I read your e-mail too late. It would have saved me more time. I recognize your solution.....

Thank you very much everyone....