Multiple QSPI devices with nRF5340 (e.g. Flash and Wifi) - can other pins than high-speed QSPI dedicated P0.13-P0.18 used for additional Chip Selects?

Hello,

this topic came up during the Nordic Tech Tour some months ago, I was advised to create a ticket at Devzone to get some feedback from Nordic tech experts.

The nRF5340 has some dedicated pins for the QSPI interface (P0.13-P0.18), which also includes the Chip Select signal according to the product specification.

Now, there might be use cases where you want to use multiple QSPI devices at the same time, for instance the nRF7002 Wifi companion chip and a QSPI Flash memory that holds user data and can be updated/accessed via Wifi.

My question is: Can other pins be used for additional Chip Select signals than P0.13-P0.18 (which does not have a spare pin for an additional Chip Select)? Do I get reliable QSPI communication if I just use a random Chip Select pin in the QSPI's PSEL register? As Chip Select is not operated with high frequency, it shouldn't affect the QSPI communication. But there might be some waitstates before beginning the QSPI transfer necessary in the case that other Chip Select pins might come with a higher latency for a single level change... so I want to know if it is "safe" to use non-dedicated Chip Select pins for the QSPI interface.

In worst case, I think it should be possible to use QSPI with multiple Chip Select signals by manually setting the Chip Select signals and disableing it in PSEL. Can you confirm this will work?

But it would be more convenient if I could just change the PSEL setting before each QSPI operation and everything would work out of the box. So please let me know which approach is possible with the nRF5340 and what not.

Maybe you could also add a comment to the Product Specification about this topic.

Best regards,

Michael

PS: My ticket is related to this one

Parents
  • Hi Michael,

    I have to ask our HW designers about this,

    I'll be back with more,

    regards

    Jared 

  • Hi,

    I just wanted to let you know that we're still working on getting information on this from our HW team. 

    Thank you for your patience,

    regards

    Jared 

  • Thanks! i'm not in a hurry, so please take your time.

  • Hi Michael,

    Disabling PSEL and manually setting chip select on IOs will not work. The QSPI peripheral needs to control the chip select. In addition using other pins then the dedicates ones for CS is outside of spec, and therefore not tested. We therefore can't guarantee that this will work, and we don't recommend it all. 

    regards

    Jared 

  • Hi Jared,

    if I understand correctly, this means the QSPI can only be used with one high speed interface device by design, because even if you disable the QSPI and re-configure PSEL.CSN, there is only one pin available that can handle the data rates reliably.

    I guess this is why you connect the QSPI flash on the nRF7002DK, which is the same as the QSPI Flahs on the nRF5340DK, here only via standard SPI, right? (Does the XIP also work with standard SPI, by the way?)

    Is there any information available if the QSPI will work reliably with different PSEL.CSN for lower data rates? Quad data lines might still be better than single bit SPI, even if it might be necessary to disable and re-enable the QSPI module each time the target device is switched. Would be nice if we could document this information in this ticket, for future reference. (Adding it to the Product Specification would also be nice.)

    Suggestion for future devices: Just add some automatic wait states for slower IO pins, if this doesn't add too much complexity for the QSPI module.

    Best regards,

    Michael

  • Hi Michael,

    puz_md said:

    if I understand correctly, this means the QSPI can only be used with one high speed interface device by design, because even if you disable the QSPI and re-configure PSEL.CSN, there is only one pin available that can handle the data rates reliably.

    Correct,

    puz_md said:
    guess this is why you connect the QSPI flash on the nRF7002DK, which is the same as the QSPI Flahs on the nRF5340DK, here only via standard SPI, right? (Does the XIP also work with standard SPI, by the way?)

    Yes, this is probably why. XiP only works with QSPI.

    puz_md said:
    Is there any information available if the QSPI will work reliably with different PSEL.CSN for lower data rates? Quad data lines might still be better than single bit SPI, even if it might be necessary to disable and re-enable the QSPI module each time the target device is switched. Would be nice if we could document this information in this ticket, for future reference. (Adding it to the Product Specification would also be nice.)

    No, we don't have any information on that since it's outside of the product spec. The product specification already mentions that only the dedicated pins should be used for QSPI.

    regards

    Jared

Reply
  • Hi Michael,

    puz_md said:

    if I understand correctly, this means the QSPI can only be used with one high speed interface device by design, because even if you disable the QSPI and re-configure PSEL.CSN, there is only one pin available that can handle the data rates reliably.

    Correct,

    puz_md said:
    guess this is why you connect the QSPI flash on the nRF7002DK, which is the same as the QSPI Flahs on the nRF5340DK, here only via standard SPI, right? (Does the XIP also work with standard SPI, by the way?)

    Yes, this is probably why. XiP only works with QSPI.

    puz_md said:
    Is there any information available if the QSPI will work reliably with different PSEL.CSN for lower data rates? Quad data lines might still be better than single bit SPI, even if it might be necessary to disable and re-enable the QSPI module each time the target device is switched. Would be nice if we could document this information in this ticket, for future reference. (Adding it to the Product Specification would also be nice.)

    No, we don't have any information on that since it's outside of the product spec. The product specification already mentions that only the dedicated pins should be used for QSPI.

    regards

    Jared

Children
No Data
Related