I am trying to minimize the power consumption of serial flash. Is there any example for DPM of QSPI?
I am trying to minimize the power consumption of serial flash. Is there any example for DPM of QSPI?
We do not have an example as each flash chip seems to have a unique way of entering DPM. You'll need to read the datasheet of the flash you're using and set the proper registers as according to the nRF52840 PS:
The external flash memory can be put in deep power-down mode (DPM) to minimize its current consumption when there is no need to access the memory.
DPM is enabled in the IFCONFIG0 register and configured in the DPMDUR register. The DPM status of the external memory can be read in the STATUS register. The DPMDUR register has to be configured according to the external flash specification to get the information in the STATUS register and the timing of the READY event correct.
Entering/exiting DPM is controlled using the IFCONFIG1 register.
Maybe you can provide DPM example for one specific flash device, in order to understand the flow needed to enter and exit DPM?
It is not clear when to set each of the DPM related registers and also how to do that in conjunction with the call to nrfx_qspi_uninit(): do we need to modify the registers inside the uninit() code ?
Maybe use macronix flash (that is used on the DK) for such example?
This will be very helpful, thanks.
I can notify the developers that there's a need for a DPM example, but it will take quite some time until it will reach the SDK.
You can set the DPMDUR and IFCONFIG0.DPMENABLE register at any time after you've called nrfx_qspi_init, then I believe you write to IFCONFIG1.DPMEN to enter or exit DPM.
Why do you need to uninit the qspi driver, do you intend to go into SystemOFF?
I can notify the developers that there's a need for a DPM example, but it will take quite some time until it will reach the SDK.
You can set the DPMDUR and IFCONFIG0.DPMENABLE register at any time after you've called nrfx_qspi_init, then I believe you write to IFCONFIG1.DPMEN to enter or exit DPM.
Why do you need to uninit the qspi driver, do you intend to go into SystemOFF?