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

Qspi interrupt hangs caused by power consumption problems

Hi,Master:

When I use the QSPI library to communicate with flash, everything works fine. After a complete read and write, nrfx_qspi_uninit() is called to reduce power consumption, but there will always be a qspi interrupt pending in the NVIC, which causes the sleep to be unsuccessful, resulting in power consumption. Adding NRFX_IRQ_PENDING_CLEAR(QSPI_IRQn) solves this problem. Why? What are the hidden issues on the nordic platform that need attention? Thank you

Parents
  • Hi,

    Is nrfx_qspi_uninit() called from an interrupt context that could block a QSPI IRQ from being serviced? Please check if the EVENTS_READY register actually is cleared (read as '0') after you have uninitialized the peripheral.    

  • Hi,Vidar Berg

    Maybe I didn't express my question clearly: I mean:When I use the QSPI library to communicate with flash, first initialize nrfx_qspi_init(&config, NULL, NULL) (handler parameter is NULL, ie: qspi internal interrupt is not enabled); after reading and writing, call nrfx_qspi_uninit() to reduce power consumption , but there will always be qspi interrupt hangs in NVIC, which will result in main

    for(;;)

    {

    App_sched_execute();

    Ble_idle_state();

    Sys_wdt_feed();

    }

    is always woken up, resulting in an average power consumption that cannot be reduced. This problem can be solved by adding NRFX_IRQ_PENDING_CLEAR(QSPI_IRQn) after calling nrfx_qspi_uninit(). why? Is there any hidden problem that needs attention in other places on the nordic platform? Thank you

  • Hi,

    I assumed you were using the drivers with interrupts enabled. I'm able to replicate it now, and it turned out to be a driver issue. nrfx_qspi_cinstr_xfer() sets the QSPI interrupt enable register even if the driver is configured in blocking mode. Thus, since the QSPI IRQ is not enabled,  a ready event from the QSPI will trigger an interrupt that won't be serviced.

    Removing the call to nrf_qspi_int_enable() in nrfx_qspi_cinstr_xfer() should fix the problem. This change was made in the nrfx 1.7.2 release:  https://github.com/NordicSemiconductor/nrfx/tree/v1.7.2 

Reply Children
Related