필터 지우기
필터 지우기

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