This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SPI Read Error

We are interfacing to a SPI Flash MX25R8035F. When attempting to read 1 page of 256 bytes from the chip we break the read command up into 4 SPI Commands.

1) Read the Status Register to verify that a write isn't in progress (write 1 byte, read 1 byte)
2) Write the read command & address (4 bytes)
3) Read out the 1st 255 bytes of data
4) Read out the last byte of data

I verified through logging that that is data length are being sent into spim_xfer

The reads only work every other time. When the read fails, the SPI clock stops running after transmitting the Read Status Command. It doesn't continue to clock in the data.

After the failed read of the status command, the next read of the Flash will succeed.

I have received the same behavior running SDK 3.0.0 and 4.0.2 Is there known issues with reading 1 byte over the SPI interface that leaves the bus in a bad state?

Shown below is scope trace of bad read (only 8 clock cycles) image description

Show below is a scope trace of a good read (16 clock cycles) image description

Parents
  • Its the first step that fails right? There is the Errata [58] SPIM: An additional byte is clocked out when RXD.MAXCNT = 1, see this section of the Errata document for more information. However, then you should see two bytes being clocked out everytime, not just every other time.

Reply
  • Its the first step that fails right? There is the Errata [58] SPIM: An additional byte is clocked out when RXD.MAXCNT = 1, see this section of the Errata document for more information. However, then you should see two bytes being clocked out everytime, not just every other time.

Children
No Data
Related