-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong values in avrdude.conf #897
Comments
The weird thing is that 0x1E9405 is the signature for ATmega169P (see datasheet). What the real device signature for ATmega165 is for me a mystery...
Good catch! This should be correct:
Will this be the case for other Xmegas as well? |
File a bug report with Microchip then … somewhere on the way, the have kaputified their datasheet.
Finally, I fetched their ATmega device packs, and extracted the ATDF files:
Note that there's no non-P version even mentioned in the device packs … (which is probably also the reason why they've labelled that Dymo label on mine). |
However, thanks for triggering me to dig out that old M165P ;-) I just noticed the signature read instruction in |
Does this mean that the Atmega165 doesn't even exist, and should instead use the ATmega165A signature instead like we do on ATmega32/32A?
Good catch! It's probably my fault, sorry. I found the ATmega165 definitions on someone's Github page and assumed that it would work. I do have a lot of various AVRs at my disposal, but unfortunately, not the ATmegaXX5 family. |
Probably, yes. Microchip has a datasheet for it but no ATDF files. That means their Studio does not support them at all (Studio needs the ATDF files).
No: the P and PA variants do exist, and use the old signature. Only the A variant got a new one.
I think they are pretty meaningless these days. I never really understand their purpose: they are cut-down versions of the "9" LCD controller line, where the LCD block has been left out. That gives lots of GPIOs, but then, the "0/1" line (ATmega640 … ATmega2560/2561) offers lots of GPIOs as well. |
Yes, makes sense that the 165 doesn't exist (if no ATDF file). Maybe consider removing from avr-libc and avrdude? |
I have been comparing what avr-gcc (11.2.0)/avr-libc sees against avrdude. Also noticed a few names that feel wrong |
suggest
Seems trivial, but one might as well make the capitalisation consistent |
What I meant was to change the avrdude.conf file to this (table below), since the ATmega165(non-A) probably doesn't exist. At least it can't be bought anymore: From this:
To this:
The argument for doing this change is that virtually any other "non-A, non-P, and non-PA" shares the same signature as the *A-part. If someone wants to program an ATmega165A chip, but are used to not adding *A to the part number (Avrdude support for *A names was recently added), it should IMO work with the non-A target instead, like with other chips (ATmega32/A, ATmega64/A, ATmega128/A etc.). I can submit a PR with this if along with the other minor things @stefanrueger pointed out. |
Fun history fact: Avr-libc today thinks that ATmega165's SIGNATURE_2 byte is 0x05 (wrong according to this discussion), and has done so for a while. Going back in history, it's as long ago as the avr-libc version that came with avr-gcc 4.8.1 when ATmega165's SIGNATURE_2 byte last was 0x07 (right according to this discussion). I had a program look at inconsistencies in terms of signature bytes, flash size and page size on the intersection between avrdude and avr-libc of supported parts. I reported discrepancies either in avr-libc or avrdude depending on the data sheets (which may or may not be right, particularly when the part in question is not known to actually exist). |
Some wrong entries in the
avrdude.conf
fileATmega165: signature bytes are 0x1E, 0x94, 0x05 (not ... 0x07)
see datasheet
ATmega64M1's flash size, page size and eeprom size need to be double each (copy/paste error from ATmege32M1?)
see datasheet
ATxmega128D4's page size should be 256, not 512, see datasheet page 16
The text was updated successfully, but these errors were encountered: