フィルターのクリア

C2000 SPI Read/Write from specified EEPROM address

6 ビュー (過去 30 日間)
Chris Mounce
Chris Mounce 2022 年 7 月 15 日
編集済み: Graham Cotgreave 2022 年 8 月 18 日
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 件のコメント
Graham Cotgreave
Graham Cotgreave 2022 年 8 月 18 日
編集済み: Graham Cotgreave 2022 年 8 月 18 日
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.

サインインしてコメントする。

回答 (0 件)

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by