Hello
I am working on an application for the nrf5340 in which I aim to use 2 devices on the QSPI bus. I am on the nrf5340 HW v2.0.0 and NCS v2.1.2.
In looking at the datasheets, there is 1 pin set aside for the CSn pin for the QSPI peripheral. The description mentions that it is a "dedicated pin" for the QSPI bus. What I am learning as I research this, is that the nrf5340 only supports 1 device on the QSPI bus in SW, though the protocol supports targeting several devices.
I found this link that mentions that in order to have several devices on the QSPI bus, you need to change PSEL.CSn on the fly before communicating to each device, however it is talking about the nrf52840. I assume it would be the same for the nrf5340.
I went ahead and implemented the line below, which seemingly works. I see a different pin firing on my QSPI operations. I do not have code accessing two devices on the bus yet, but this appears to be a valid solution.
NRF_QSPI_S->PSEL.CSN = 12;
I then conducted more DevZone research to see if anyone else attempted this or found a different solution, and saw this in a similar topic:
My question then is: as I implement a driver that will allow me to use the QSPI bus for 2 devices, I plan to change the CSn pin via the code above every time I need to change between devices. How important or relevant do you think it is that I un-initialize the QSPI bus or the target devices for every R/W operation? Are there any known fixes or updates out/coming out soon? As I see it, the only limitation is in the driver, and if the QSPI driver accepted a different CSn pin for each device then this would not be a problem.
Thanks in advance. Any help or insight is appreciated.