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 Reply Children
No Data
Related