Latest Arduino IDE lying about 328 signature? AVRDUDE says otherwise

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

I have been having a problem with a breadboard I had made.  I thought I specified to the PCB assembler to use Atmega328p-AU-TQFP32 chips, but out of 10, they seem to be Atmega328-AU-TQFP32 parts.  While I think I can live... my old Arduino IDE (don't remember the rev) wouldn't download to them as an 8MhZ 3.3V part, because it said the signature was 0x1E9514.  AVRDude via AVRDudess was saying the same.  I was about to futz with boards.txt to fix this when I decided I hadn't upgraded my Arduino IDE in a while, and I should do this before making changes to boards.txt with batch files that changed things back and forth between different boards.txt, etc.

When I upgraded to IDE v1.8.13 (on Windows 10 Home), I tried to upload to my board, and IT WORKED.  It says the signature is the 328p (0x1E950F).  What?  AVRDudess still says it's 0x1E9514.  While I'm elated I don't have to mod boards.txt, what gives?  Am I on crack?

Here's my uploading output:

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Jeff Long\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf"

         Using Port                    : COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\JEFFLO~1\AppData\Local\Temp\arduino_build_317201/blink.ino.hex"
avrdude: writing flash (2142 bytes):

Writing | ################################################## | 100% 1.07s

avrdude: 2142 bytes of flash written
avrdude: verifying flash memory against C:\Users\JEFFLO~1\AppData\Local\Temp\arduino_build_317201/blink.ino.hex:
avrdude: load data flash data from input file C:\Users\JEFFLO~1\AppData\Local\Temp\arduino_build_317201/blink.ino.hex:
avrdude: input file C:\Users\JEFFLO~1\AppData\Local\Temp\arduino_build_317201/blink.ino.hex contains 2142 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.91s

avrdude: verifying ...
avrdude: 2142 bytes of flash verified

avrdude done.  Thank you.

 

[Insert Cool and Witty Signature Here]

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

You are talking to a Bootloader not the native ISP interface.

A hardware ISP programmer actually reads the hardware Signature e.g. 328, 328P, 328PB.

 

Most bootladers tend to just return a dummy Signature e.g. 1E 95 0F

Older AVRs like mega32 are not capable of reading hardware Signature via a bootloader.

However 328, 328P, 328PB can be read by the bootloader.   Popular bootloaders just choose not to.

 

In practice the Arduino IDE does not need to worry about 328 or 328P.   Sketches will work the same.

 

David.

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

Most bootladers tend to just return a dummy Signature e.g. 1E 95 0F

 That is DEFINITELY the case with the Optiboot bootloader used on AVR Arduinos.  The signature is hard-wired into the source code at compile time.

Since 328 and 328p are essentially indistiguishable to most software, that was "recommended procedure" for supporting the 328 - just throw in a 328p bootloader, and the IDE doesn't need to have a clue that it's being fooled.  (More recently, I believe that AVRDude's "minicore" has separate support and bootloader for the non-P 328.