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
drivers: add driver for AT25xxx family of EEPROMs #11945
Conversation
612968d
to
46e3d18
Compare
46e3d18
to
d6dd452
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good to me. I have some inline-comments. But I guess we should wait if an agreement about a common EEPROM API can be reached within reasonable time, so that using external EEPROM devices becomes easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks pretty slim and clean in my eyes. Have a look at inline comments.
939103d
to
37a7aba
Compare
Rebased to current master |
3cd680e
to
ee0f483
Compare
@benpicco could you post some test output? |
Which reminds me - I should probably remove that additional debug output. |
|
Sorry, I just noticed one last thing regarding doxygen. Without this, the module would have appeared in the first level modules list. |
This adds a driver for the ST M95xxx series SPI EEPROMs. The driver has been tested with the M95M01 EEPROM, but should work with other chips from that family. SPI-EEPROMs from other vendors from the families AT25xxx, 25AAxxx, 25LCxxx, CAT25xxx & BR25Sxxx should also in the same way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK , please squash! (already squashed...)
Thank you for the review! |
Contribution description
ST offers SPI based EEPROMs from the M95xxx family.
I've tested it with the M95M01 EEPROM. Other variants exist that differ in page size and address length, but follow the same command scheme.
Devices from other vendors that function in the same way include the families AT25xxx, 25AAxxx, 25LCxxx, CAT25xxx & BR25Sxxx.
I've decided to make
both page size andaddress length a compile-time constant as it allows for compile-time optimizations and the I considered likelihood of having two EEPROMs of different type on the same board to be rather slim.I can move those parameters to
at25xxx_params_t
if desired.The EEPROM interface definition is blatantly stolen from #11929, but no
periph_eeprom
compatibility wrapper is provided yet.Testing procedure
AT25XXX_PARAM_…
according do your board and EEPROM devicetests/driver_at25xxx
Issues/PRs references
will be converted to the new EEPROM API once #12091 is finalized.
This provides an SPI Implementation analogous to the I2C EEPROM implementation in #11929
So we'll have