-
Notifications
You must be signed in to change notification settings - Fork 139
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
Read sigrow for ATmega32[48]PB using ISP #1510
Conversation
I think I have a simpler way of reading sigrow that does not require it to look like flash (though it might well be). Adding this memory should be sufficient I think:
@dl8dtl will like this if it works b/c it uses the vvv flexible way ISP command descriptions were designed. Such a memory might reveal undocumented calibration values in other parts, too. |
I tried this PR by adding a flash page's worth of diff --git a/src/avrdude.conf.in b/src/avrdude.conf.in
index 1bf7e43a..f90d63ae 100644
--- a/src/avrdude.conf.in
+++ b/src/avrdude.conf.in
@@ -13249,6 +13249,11 @@ part
read = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
;
+ memory "sigrow"
+ size = 256;
+ read = "0 0 1 1 a0 0 0 0 0 0 0 0 0 0 0 0 0 a7 a6 a5 a4 a3 a2 a1 o o o o o o o o";
+ ;
+
memory "calibration"
size = 1;
read = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo"; Then I can read signature and calibration memories through sigrow (interleaved); there is some (undocumented) further info in that page:
|
Thanks for the PR! I'll see if I can give it a try tonight on both the 324PB and the 328PB. Will it work on an ATmega324PB using a JTAG programmer? |
I wouldn't have thought so! Jtag is your expertise, not? 😉 |
It does not seem to work with my ATmega328PB-XMINI.
|
The Lines 2401 to 2409 in 55853eb
Have you tried |
I see.
|
@mcuee Thanks for confirming that direct ISP programming elicits the
instead of
I like that your examples use |
The AVRISPmkII programmer can't read sigrow on the ATmega328PB:
|
Did you expect this to work given that the PR targets direct ISP programming? AVRISPmkII uses the STK500v2 protocol, which does not appear to know |
So, looks like @mcuee's test with If tests are good, I suggest merging this PR and divide the work for AVRISP (myself?) and JTAG (@MCUdude?) for other PRs. |
Not really. I thought I read in an email that we should try with a different stk500v2 programmer just to make sure, but that seemed to be just me making things up. Anyways it's great that it works with direct ISP commands, but this will make the sigrow memory one of very few (?) memories that can only be read by certain ISP programmers.
Yes, they suddenly dropped support for this, so this won't work for all official ISP programmers. Just for reference:
|
Do you mean a separate PR for using stk500v2 compatible programmers that does or does not support CMD_SPI_MULTI? The absolute best would be that the sigrow memory could be read with any ISP or JTAG programmer, regardless of the communication protocol, but I'm not qualified to tell whenever this would actually be possible or not |
That was the other PR #1511 😄
Yes, having looked at the protocol I have an idea how one might attempt this without using
I still don't find my way around JTAG programmers in AVRDUDE code. So that would still be a different PR, and someone else would need to look into this. |
Well, this is the problem. It could be that the protocol restricts what the host can ask the programmer to do. The |
It may well be that Atmel's programmers are not intended to be able to read |
Interesting, this almost works. Have you tried to set the OCDEN fuse bit first? |
I agree to merge this PR. Just FYI, STK500v2 does not seem to work now. But I think you have the ideas of how to make it work later. Strange thing is that AVRISP mkii does not work all, but there are some strange outputs from STK500v2. Both are clones but running official Atmel FW.
|
I was just about to update the documentation for Should we rename the sigrow memory to prodsig for this PR and also for the existing t102/t104 and alias sigrow to prodsig for the four parts t102, t104, m324pb and m328p? We could also alias sigrow to prodsig for all other 145 U/PDI parts. The only disadvantage of the name |
No objections from my side, including to alias sigrow to prodsig for all other 145 U/PDI parts. |
... and create a memory alias from sigrow to prodsig
Looks good to me! Thanks @stefanrueger! |
Fixes #1509 for ISP (well, a first shot anyway).
This PR introducessigrow_pb
memory, which needs a different name thansigrow
(used for Attiny102/104) at least until Issue #1330 is addressed.