Jump to content
  • 0

SPI CmdRead Returns Zero


ammarredaa

Question

 

 

Greetings, I've been using Digital Discovery SPI read/write commands to communicate with a specific board. While I can successfully write to it, the issue arises when I attempt to read, the return value in the script is consistently showing as zero. Interestingly, the board appears to respond as anticipated on the waveform. I've verified the connection, and it is connected as expected.

 

spi_rd_script.png.c8cf817586b5af220f0d4e7c2592b542.pngspi_rd_waveform.png.40ebbf46f4d3fa66efd4858fa23a39e9.png

 

Edited by ammarredaa
adjusting formating
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @ammarredaa

If you are using "Debug with Logic Analyzer" the reception with Protocol is disabled, function returns 0s
Note that your CmdWrite and CmdRead are performed in one CS cycle, since it is between Start and Stop. If you want these to be performed in separate cycles you don't have to call Start or Stop at all, Write/Read asserts CS automatically with hardware timing if software Start is not called.

image.png

PS: deadc0de :)

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...