Effacer les filtres
Effacer les filtres

C2000 SPI Read/Write from specified EEPROM address

6 vues (au cours des 30 derniers jours)
Chris Mounce
Chris Mounce le 15 Juil 2022
Modifié(e) : Graham Cotgreave le 18 Août 2022
I've taken a look at the Matlab example models, and I have been able to do a batch read/write, but I am unsure as to where on the EEPROM the data is being stored. When checking the register address checkbox, what do the numbers in the register access dialog correspond to? Is it command(2), address (0), and data length(32)? And is the data length in bytes, words, or data elements?
I would like to do several one-time writes and reads to various locations on the EEPROM, and do not know how to specify the location on the EEPROM. I would like to read/write from/to a specified (non-default) address using the master transfer block (or any other SPI block for that matter).
  1 commentaire
Graham Cotgreave
Graham Cotgreave le 18 Août 2022
Modifié(e) : Graham Cotgreave le 18 Août 2022
Hi, I have a very similar problem getting information about that register.
I was pointed to What are the use case scenarios for SPI (Master Transfer/Transmit/Receive) blocks when developing a Simulink Application for ... - MATLAB Answers - MATLAB Central (mathworks.com) , that does explain the second and third digits as being a "Register address" so I don't believe it is a data length - that is determined by the input stream.
The help says "The positive integer vector is specified as, [2 0 32] for Write Data to Memory and [3 0 32] for Read Data from Memory. For more information, refer to the examples [Using SPI to Read and Write Data to SPI EEPROM]. - but there are no further details their as described.
I have also seen a different case "Register address: [2]", which I assume means the signal at the input would be interpreted as ADRR ADDR ADDR DATA DATA DATA DATA.... but can't confirm that.

Connectez-vous pour commenter.

Réponses (0)

Produits


Version

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by