Skip to content
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

BootloaderDFU.c replies with wrong signature #56

Closed
Reuti opened this issue Jul 31, 2015 · 2 comments
Closed

BootloaderDFU.c replies with wrong signature #56

Reuti opened this issue Jul 31, 2015 · 2 comments
Labels

Comments

@Reuti
Copy link

Reuti commented Jul 31, 2015

Hi,

there are four bytes which should be output as signature:

30h Read Manufacturer Code
31h Read Family Code
60h Read Product Name
61h Read Product Revision

in BootloaderDFU.c I see (in todays Git-download):

    const uint8_t SignatureInfo[4]  = {0x58, AVR_SIGNATURE_1, AVR_SIGNATURE_2, AVR_SIGNATURE_3};
    ...
          ResponseByte = SignatureInfo[DataIndexToRead - 0x60 + 3];

Questions:

a) Isn't the manufacture always 0x1E for Atmel, i.e. the AVR_SIGNATURE_1 value? What I see missing is the Product Revision where we might need an arbitrary value, but at the end of the list?

b) To cover access to the values which should be replied for the offset 0x60 and 0x61: maybe + 3 should read + 2 only. 0x61 would otherwise point behind the array when we add 3.

-- Reuti.

@abcminiuser
Copy link
Owner

Hi Reuti, sorry I left this one dangling for so very long.

The manufacturer code isn't actually the 0x1E you expect; I can't remember where this is sourced from, but it's a differently allocated value to the regular Atmel manufacturer code that people know from the ISP signature (somewhat similar to the JTAG device manufacturer ID, which is different again). The 0x1E manufacturer is actually the first byte of the AVR's signature. This means that what the host sees for the AT90USB1287 is 0x58 0x1E 0x97 0x82.

The access is indeed broken, and I very unwisely forgot the bounds checks. I've cleaned this up in 6b06bc6 for the next release. Thanks!

@Reuti
Copy link
Author

Reuti commented Nov 9, 2015

Hi,

Am 08.11.2015 um 04:51 schrieb Dean Camera notifications@github.com:

Hi Reuti, sorry I left this one dangling for so very long.

The manufacturer code isn't actually the 0x1E you expect; I can't remember where this is sourced from, but it's a differently allocated value to the regular Atmel manufacturer code that people know from the ISP signature (somewhat similar to the JTAG device manufacturer ID, which is different again). The 0x1E manufacturer is actually the first byte of the AVR's signature. This means that what the host sees for the AT90USB1287 is 0x58 0x1E 0x97 0x82.

Thx for the clarification - I wasn't aware of this.

The access is indeed broken, and I very unwisely forgot the bounds checks. I've cleaned this up in 6b06bc6 for the next release. Thanks!

Perfectly solved.

Regards -- Reuti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants