Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

QSPI Drawing More Power When Disabled!

Hello guys,

I was doing some testing with the QSPI component, and noticed exceptionally high current draws depending on whether the Peripheral was on, off, and if the Macronix chip on the DK was in Deep Power-Down mode.

The anomaly document here states that we should manually set two registers to truly disable the peripheral once it is de-initialized:

http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52840.Rev1.errata%2Fdita%2Ferrata%2FnRF52840%2FRev1%2Flatest%2Ferr_840_new.html

 However, in the recently launched SDK15, this is the code from "nrfx_qspi.c":

void nrfx_qspi_uninit(void)
{
    NRFX_ASSERT(m_cb.state != NRFX_DRV_STATE_UNINITIALIZED);

    nrf_qspi_int_disable(NRF_QSPI, NRF_QSPI_INT_READY_MASK);

    nrf_qspi_disable(NRF_QSPI);

    nrf_qspi_task_trigger(NRF_QSPI, NRF_QSPI_TASK_DEACTIVATE);

    // Workaround for nRF52840 anomaly 122: Current consumption is too high.
    *(volatile uint32_t *)0x40029054ul = 1ul;

    NRFX_IRQ_DISABLE(QSPI_IRQn);

    nrf_qspi_event_clear(NRF_QSPI, NRF_QSPI_EVENT_READY);

    m_cb.state = NRFX_DRV_STATE_UNINITIALIZED;
}

As we can see, only one of the two lines is actually implemented. Furthermore - is there any guarantee that this line is in the right place? The anomaly document says to run these lines "before disabling QSPI" - but should this be run before the line: nrf_qspi_disable(NRF_QSPI); ?

My current consumption after putting the flash memory to sleep and disabling the QSPI peripheral is ~7mA larger than when it is enabled! That's pretty funky. I've never seen a system before where disabling a peripheral increases power consumption by this much!

Please advise :) 

Parents
  • Hi, the first line in the workaround is actually the same as nrf_qspi_disable(), so it seems to be implemented correctly. I will have to set up a test here and try to reproduce it. I will give you an update soon. Sorry for the late response.

  • Hello,

    I have the same bug here. Any solution?
    I removed power from Flash and kept sending SPI commands, then uninit QSPI and it works as expected:

    • 783uA if I don't uninit QSPI
    • 272uA once uninit on my board

    As soon as I have a QSPI Flash wired: 

    • 792uA once Flash powered down, QSPI not uninit
    • 2mA as soon as I try to uninit QSPI

    May it be relasted to RX?

    SPI commands are: QSPI_STD_CMD_RSTEN, QSPI_STD_CMD_RST, CMD_DEVICE_ID (0x9F), CMD_DEEP_PWRDOWN (0xB9).

    I also tried with QSPI driver from SDK 15.2 (with nrf_qspi_disable(NRF_QSPI); used after the workaround) with no luck.

    Best,

Reply
  • Hello,

    I have the same bug here. Any solution?
    I removed power from Flash and kept sending SPI commands, then uninit QSPI and it works as expected:

    • 783uA if I don't uninit QSPI
    • 272uA once uninit on my board

    As soon as I have a QSPI Flash wired: 

    • 792uA once Flash powered down, QSPI not uninit
    • 2mA as soon as I try to uninit QSPI

    May it be relasted to RX?

    SPI commands are: QSPI_STD_CMD_RSTEN, QSPI_STD_CMD_RST, CMD_DEVICE_ID (0x9F), CMD_DEEP_PWRDOWN (0xB9).

    I also tried with QSPI driver from SDK 15.2 (with nrf_qspi_disable(NRF_QSPI); used after the workaround) with no luck.

    Best,

Children
No Data
Related