How to configure QSPI into Deep power down mode while using XiP.

Hello,

I am using nRF5340 with nrf v2.7.99-cs2.

We have interfaced External flash MX25R over nRF5340's QSPI channel. We are using XiP as well and some part of code lies on external flash. We need to put external flash to deep sleep mode using QSPI when code from external flash will not be executed in our applications low power mode. 

I tried to use pm_device_action_run(flash_dev, PM_DEVICE_ACTION_SUSPEND) and put flash to sleep so that it consumes less current, but I am getting Flash busy error. Can you please help me with a solution so that I can put flash in sleep mode when not executing from external flash under XiP.

Thanks in advance,

Akshay

Related