This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using QSPI library with external flash other than MX25R6435F

Hello,

I am currently working on nRF52840 DK while waiting for my custom board using this chip.

This custom board will include Toshiba external flash of family TC58CYG2S0HxAIx (datasheet here).

I would like to perform operations on this flash using nRF QSPI module. But it seems that the QSPI module is meant to be used with MX25R6435F external flash that is on nRF52840 DK.

First the addressing is different between the two external flash chips and I am not sure we can easily adapt the addressing in nRF QSPI module.

Also I noticed that the operation codes sent from the nRF chip to the external flash for both nrf_drv_qspi_write and nrf_drv_qspi_read is hardcoded somwhere and can be configured at initialization by setting nRF chip registers as you can see in the 2 screenshots below:

Then I thought about using nrf_drv_qspi_cinstr_xfer to complete operations on my Toshiba external flash but this function seems to have some critical constraints:

  1. It is sychronous so we can't do something else while waiting for the end of the transmission or power manage the CPU, so this function seems not compatible with low power designs.
  2. We can receive a very limited amount of data (8 bytes) in response to the instruction so if I want to perform a read of a full page it won't be possible using this function.

Is there a way to use nRF QSPI module to address and perform operation on an other external flash than the SoC ?

If not can you suggest me other solutions:

- Other reference for a QSPI compatible external flash with the same storage capacity than Toshiba

- Use an other nRF module

- Anything else...

Thanks a lot

Kind regards

Bilal

Parents
  • Also I noticed that the operation codes sent from the nRF chip to the external flash for both nrf_drv_qspi_write and nrf_drv_qspi_read is hardcoded somwhere

    Strictly speaking, the supported command codes are hard coded into the chip. The nRF52840 has a "shortcut" interface for performing read, write and erase operations (which, as you noted above, is somewhat configurable). If you look in the nRF52840 manual there's a table of all the commands that the QSPI controller supports.

    But the datasheet for the Toshiba part seems to show that it supports the same commands. There are some thing in the Nordic SDK examples which are specific to the Macronix part (for example there is special code to set a bit in one of the registers to enable 4-wire mode instead of 1-wire mode), but mostly it should with with any typical QSPI part. Is there something in particular that makes it look like the Toshiba parts would be incompatible with the shortcut read/write/erase interface?

    -Bill

  • Hi Bill,

    First thank you for your answer.

    Is there something in particular that makes it look like the Toshiba parts would be incompatible with the shortcut read/write/erase interface?

    At first sight Toshiba parts seems compatible with Nordic QSPI read/write/erase interface, at least for fast read, page program and block erase. We can see that when we compare the commands table:

    But when we take a look at the details, for instance for read operation we can see that it's not as simple as just sending the operation code:

    First, we must send custom instructions using nrf_drv_qspi_cinstr_xfer to transfer the data from the cell array to the internal data buffer of Toshiba chip and check some status flags. That means that we have to use a synchronous function and abandon the low power oriented design for the driver of Toshiba parts. That is not very practical.

    But the most critical part is for the read buffer instruction:


    After sending the read buffer operation code, we must send the address in 16 bits with 3 dummy bits (set to 0 in the screenshot). But it seems that Nordic QSPI module only supports 24 and 32 bits addressing modes, that means that nrf_drv_qspi_read will send extra dummy bits and prevent communication between nRF QSPI interface and Toshiba chip.

    Bilal

Reply
  • Hi Bill,

    First thank you for your answer.

    Is there something in particular that makes it look like the Toshiba parts would be incompatible with the shortcut read/write/erase interface?

    At first sight Toshiba parts seems compatible with Nordic QSPI read/write/erase interface, at least for fast read, page program and block erase. We can see that when we compare the commands table:

    But when we take a look at the details, for instance for read operation we can see that it's not as simple as just sending the operation code:

    First, we must send custom instructions using nrf_drv_qspi_cinstr_xfer to transfer the data from the cell array to the internal data buffer of Toshiba chip and check some status flags. That means that we have to use a synchronous function and abandon the low power oriented design for the driver of Toshiba parts. That is not very practical.

    But the most critical part is for the read buffer instruction:


    After sending the read buffer operation code, we must send the address in 16 bits with 3 dummy bits (set to 0 in the screenshot). But it seems that Nordic QSPI module only supports 24 and 32 bits addressing modes, that means that nrf_drv_qspi_read will send extra dummy bits and prevent communication between nRF QSPI interface and Toshiba chip.

    Bilal

Children
No Data
Related