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

nRF52840 QSPI Power Consumption

We're using the nRF52840 on a battery-powered device that requires very low power consumption, both in run mode and also in the Cortex-M4 sleep / deep sleep modes. We've recently identified the QSPI controller as an apparent consumer of a lot of power. For instance:

  • On our board, we see under 0.4 mA current draw (which is good) if we do the following:
    • power on our Flash
    • init the QSPI controller, but perform no QSPI operations
    • uninit the QSPI controller
    • set our Flash's nCS pin output-high (since the QSPI controller isn't doing that anymore)
    • enter deep sleep
  • However, we see about 1.6 mA current draw if we do exactly the same but just let QSPI continue to be enabled (we don't uninit the QSPI controller or set nCS output-high)
  • To eliminate the possibility of our Flash part contributing to this, we modded our firmware to change the QSPI interface to use six unconnected pins on our board. With this configuration we see about 0.3 mA current draw if we do the following:
    • init the QSPI controller, but perform no QSPI operations
    • uninit the QSPI controller
    • enter deep sleep
  • However, we see about 1.85 mA current draw if we do exactly the same but don't uninit the QSPI controller.
  • Determining the impact of enabling QSPI in Run mode is a little tricker, but when we use the interactive debugger to step past nrfx_qspi_init(), we see current draw immediately jump by about 0.7 mA.
  • Reducing the QSPI clockspeed doesn't seem to affect the current draw in these scenarios.
  • We've verified that the board is staying in deep sleep mode once it enters that mode

Our primary question is, Is it correct that we should be seeing the QSPI controller use so much power when enabled -- 1.2 mA or more while in sleep mode, and at least 0.7 mA in run mode -- even when it is not actually in use? 

Our secondary question is, Are there any options for significantly reducing the QSPI controller power consumption in run and sleep modes, other than calling nrfx_qspi_uninit()?

Parents
  • The flash chip itself consumes much more current when CS is pulled low. The QSPI peripherial keeps CS low when using XIP mode  - in order to minimize acess latency.

    You can exit XIP mode by using the regular nrfx_qspi_read()  on a dummy address.

  • > The flash chip itself consumes much more current when CS is pulled low

    Right, but I don't see how that's relevant here. The QSPI controller is setting nCS high when QSPI is initialized, and we're not performing any operations on the QSPI bus that would cause the QSPI controller to set nCS low. Certainly not in sleep mode.

    Also, as I indicated, we're seeing this relatively high power consumption by the QSPI controller even when we configure it to use pins that are not connect to a Flash part, so that can't be what's causing the increase in power consumption.

    >  The QSPI peripherial keeps CS low when using XIP mode  - in order to minimize acess latency.. You can exit XIP mode by using the regular nrfx_qspi_read()  on a dummy address

    We're not using XIP mode.

Reply
  • > The flash chip itself consumes much more current when CS is pulled low

    Right, but I don't see how that's relevant here. The QSPI controller is setting nCS high when QSPI is initialized, and we're not performing any operations on the QSPI bus that would cause the QSPI controller to set nCS low. Certainly not in sleep mode.

    Also, as I indicated, we're seeing this relatively high power consumption by the QSPI controller even when we configure it to use pins that are not connect to a Flash part, so that can't be what's causing the increase in power consumption.

    >  The QSPI peripherial keeps CS low when using XIP mode  - in order to minimize acess latency.. You can exit XIP mode by using the regular nrfx_qspi_read()  on a dummy address

    We're not using XIP mode.

Children
No Data
Related