Jump to content
  • 0

SPI writing with 16-bit address


misscmos

Question

I hope my elementary-level question does not corrupt this forum. 

I am using Digital Discovery & Waveforms 3.19.5 version to control SPI on our research test chip.

In the document of the SPI embedded into the test chip, the instruction of the SPI control is such like the attached image.

The instruction code for "read-write single byte" is h69.

For example, I would like to write "h32" in the register address of "h0A42". 

So, I set the SPI protocol in the Waveforms such like the 2nd attached image.

Is this setting correct?

SPI1.png

SPI2.PNG

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi @misscmos

Yes or you can simply use for all (instr,adr0,1,data,crc) the Write words.
The Command is for convenience if this needs to be a different bit length.

You can use the "Logic Analyzer"/Debug mode to see what and how is generated and received.

image.png

 

The newer sw version brings hw controlled CS and timing options.

 

Link to comment
Share on other sites

  • 0

Hi @attila

 

I have another desparate question about reading SPI registers.

In this time, I try our "reading only single byte" mode, which is written like the 1st image file.

The instruction of the "reading only single byte" mode is "h33" and I would like to read the address of "h0A42".

So, I run the Waveforms, like the 2nd image file and then I got the waveforms in the Logic Analyzer, like the 3rd image file.

The "MISO" port has no "reading" value from the register in my test chip.

Could you please give me an advice to use our "reading only single byte" mode?

 

Best regards,

SinNyoung Kim

SPI5.PNG

SPI6.PNG

SPI7.PNG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...