avrdudes / avr-libc

The AVR-LibC package provides a subset of the standard C library for AVR 8-bit RISC microcontrollers.
https://avrdudes.github.io/avr-libc/
Other
240 stars 52 forks source link

Signature bytes wrong for a number of devices #877

Open stefanrueger opened 2 years ago

stefanrueger commented 2 years ago

Some SIGNATURE_2 values are wrong in io header files.

iom164.h should be:

#if defined(__AVR_ATmega164A__)
#define SIGNATURE_2 0x0F
#else
#define SIGNATURE_2 0x0A
#endif

iom324.h should be

#if defined(__AVR_ATmega324A__)
#define SIGNATURE_2 0x15
#else
#define SIGNATURE_2 0x08
#endif

see datasheet page 298


iom169.h should be

#if defined(__AVR_ATmega169A__)
#define SIGNATURE_2 0x11
#else
#define SIGNATURE_2 0x05
#endif

iom329.h should be

#if defined (__AVR_ATmega329P__) || defined (__AVR_ATmega329PA__)   
#define SIGNATURE_2 0x0B
#else
#define SIGNATURE_2 0x03
#endif

iom3290.h should be

#if defined (__AVR_ATmega3290P__)
#define SIGNATURE_2 0x0C
#else
#define SIGNATURE_2 0x04
#endif

iom6490.h should be

#if defined (__AVR_ATmega6490P__)
#define SIGNATURE_2 0x0C
#else
#define SIGNATURE_2 0x04
#endif

see datasheet 169/329/p/pa, page 294 and datasheet 329p page 299


iom325.h should be

#if defined (__AVR_ATmega325P__)
#define SIGNATURE_2 0x0D
#else
#define SIGNATURE_2 0x05
#endif

iom645.h should be

#if defined (__AVR_ATmega645P__)
#define SIGNATURE_2 0x0D
#else
#define SIGNATURE_2 0x05
#endif

iom3250.h should be

#if defined (__AVR_ATmega3250P__)
#define SIGNATURE_2 0x0E
#else
#define SIGNATURE_2 0x06
#endif

iom6450.h should be

#if defined (__AVR_ATmega6450P__)
#define SIGNATURE_2 0x0E
#else
#define SIGNATURE_2 0x06
#endif

see datasheet 165/325/p/pa, page 264 and datasheet 325p page 274

dl8dtl commented 2 years ago

#if defined (__AVR_ATmega325P__)

This lacks the ATmega325PA which also needs 0x0D (see ATDF file).

stefanrueger commented 2 years ago

More wrong signature bytes:

iotn4.h and iotn5.h should define SIGNATURE_1 to 0x8F (not 0x90). See .atdf files and avrdude signature entries.


io4434.h should define SIGNATURE_1 to 0x92 (not 0x93). See avrdude signature entries (consistent with 0x92 typically implying 4 kB flash).

It also should define SIGNATURE_2 to 0x02 (not 0x03). See avrdude signature entries. The signatures that are currently defined for the AT90S4434 are actually those from the AT90S8535.


Following the change of signature in avrdude for the ATmega165, the file iom165.h should now define SIGNATURE_2 as 0x10. See avrdude issue 899 and commit.