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

Support serial flash with 16 byte unique id #1819

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

peterharperuk
Copy link
Contributor

Flash devices like IS25LP016D have a 16 byte unique id. Reading just the first 8 bytes causes devices to have duplicate unique ids as the numbers only differ in the final 8 bytes.

Support overriding FLASH_UNIQUE_ID_SIZE_BYTES in the board header. Use the final 8 bytes for the unique id.

Fixes #1641

Flash devices like IS25LP016D have a 16 byte unique id. Reading just the
first 8 bytes causes devices to have duplicate unique ids as the numbers
only differ in the final 8 bytes.

Support overriding FLASH_UNIQUE_ID_SIZE_BYTES in the board header. Use
the final 8 bytes for the unique id.

Fixes raspberrypi#1641
andygpz11
andygpz11 previously approved these changes Aug 15, 2024
Copy link
Contributor

@andygpz11 andygpz11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kilograham kilograham merged commit e049f50 into raspberrypi:develop Aug 15, 2024
1 check passed
Comment on lines +49 to +51
#ifndef FLASH_UNIQUE_ID_SIZE_BYTES
#define FLASH_UNIQUE_ID_SIZE_BYTES 8
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description for this PR says "Support overriding FLASH_UNIQUE_ID_SIZE_BYTES in the board header."
Does that mean that in hindsight this should have become a // PICO_CONFIG: entry?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, probably.

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

Successfully merging this pull request may close these issues.

IS25LP***D flash uID size is wrong in SDK and produce duplicated flash uID
4 participants