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

What does QSPI ACTIVATE task do?

What does the QSPI controller inside the nRF52840 do when the ACTIVATE task is started?

Does the ACTIVATE task result in communications with the external QSPI part such as some kind of handshaking such as QPSI part identification?

If yes and an external part is not connected, is my assumption correct in that the READY event will not be raised?

Background: We have some custom boards which fail in QSPI_WAIT_READY() (line 159, nrf_drv_qspi.c, SDK 14.2.0) when initialising the QSPI interface, the READY event is never received after ACTIVATE is issued.

We suspect this is due to soldering issues and the CPU is unable to communicate with the external QSPI part. Some of our boards can successfully communicate with external QSPI parts.

NRF SDK Suggestion: This is one of the few places in the NRF5 SDK that I've seen where there is a busy-wait loop without possibility for a timeout if expected conditions are not met. This can result in a firmware lockup with no possibility to handle any error conditions gracefully.

Please add support for some kind of timeout parameter in QSPI_WAIT_READY() such that error conditions can be appropriately handled.

  • Hi,

    When triggering the TASKS_ACTIVATE task, the interface requests clocks and tries to read the status register of the external Flash memory.

    You are correct that if the EVENTS_READY event is not gerenated, the code will be stuck at this line. I have reported it internally, and we will add timeout or some other recovery solution in future releases. If you do not want to change the driver yourself to add a timeout, you can setup the watchdog timer peripheral to recover from such situatuions. This will trigger MCU reset, but at least you get out of the blocking loop.

    Best regards,

    Jørgen

Related