- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using nrf52840 to interface with s25FS256 memory. I have been able to get it working in standard SPI mode, read and write works perfectly fine.
I am trying to use Quad I/O mode. I am setting quad bit in CR1V to 1 but i am not setting QPI mode in CR2V as nrf qspi driver does not support QPI mode.
With CR1V quad bit set to 1, the write seems to succeed, but when i read back the contents do not match. I get back mostly F's and D's. Any idea what i might be missing?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sumanth,
In that case, you will have to use single SPI command for programming.
For reading, there is a Quad I/O Read (1-4-4) command that uses single line for instruction and four lines for address and for receiving the data. You can use it for reading if your microcontroller supports that. FS-S does not support Quad Output Read command (1-1-4).
Regards,
Apurva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sumanth,
Could you please tell me how are you confirming that write operation is succeeding, if the read operation is not working?
Quad I/O read command requires some latency cycles, depending upon the frequency of operation. What is the frequency that you are working on?
You can read more about latency cycles in section "3.3.15 Quad Latency (Dummy) Cycle" on page 22 of the datasheet (https://www.cypress.com/file/216421/download ), where it says -
"Read commands may have zero to several latency cycles during which read data is read from the main flash memory array before transfer to the host. The number of latency cycles are determined by the Latency Code in the Configuration Register (CR2V[3:0]). During the latency cycles, the host keeps CS# low. The host may drive the IO signals during these cycles or the host may leave the IO floating. The memory does not use any data driven on IO during the latency cycles. The host must stop driving the IO signals on the falling edge at the end of the last latency cycle. It is recommended that the host stop driving them during all latency cycles so that there is sufficient time for the host drivers to turn off before the memory begins to drive at the end of the latency cycles. This prevents driver conflict between host and memory when the signal direction changes. The memory does not drive the IO signals during the latency cycles."
Regards,
Apurva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, thanks for the response.
I am not entirely sure if the QSPI writes are succeeding either. But the nordic (nrf52840) sdk gives a callback that it succeeds. I did set the latency cycles to 0 and try, but it did not make any difference. The Standard SPI mode seems to work fine though. So i am not sure what has to be different in QSPI except setting CR1V quad bit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sumanth,
Could you please tell me the frequency that you are working on? As you can see on page 62 of the datasheet (https://www.cypress.com/file/216421/download ) "Table 35. Latency Code (Cycles) Versus Frequency", the latency cycles are set according to the operating frequency.
Could you please provide us the logic analyzer waveforms for the write and read operation in QSPI mode?
Regards,
Apurva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running the clock signal at 32MHz. That is the maximum frequency
supported by nrf52840
On Thu, Jul 4, 2019, 2:41 AM ApurvaS_36 <community-manager@cypress.com>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sumanth,
Could you please tell me the exact command sequence that you are following? If it is not a problem, could you please share your code with us?
Also, is it possible for you to record the waveforms with a logic analyzer and share it with us?
Regards,
Apurva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well I think I just realized this part does not support Quad page program
and has been replaced by QPI mode 4PP. Nrf52840 does not support QPI
(sending instructions on all 4 lines). Is there any workaround for this?
On Thu, Jul 4, 2019, 5:57 AM ApurvaS_36 <community-manager@cypress.com>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sumanth,
In that case, you will have to use single SPI command for programming.
For reading, there is a Quad I/O Read (1-4-4) command that uses single line for instruction and four lines for address and for receiving the data. You can use it for reading if your microcontroller supports that. FS-S does not support Quad Output Read command (1-1-4).
Regards,
Apurva