SPI slave interruption not called after __WFE

Module: nRF52810

SDK: 14.2

Softdevice: S132 v5.1.0

Hi,

I modified the serial dfu bootloader exemple to use the SPI slave 0 instead of the UART to communicate between the host MCU and the nRF chip.

Everything works fine when i keep the debug messages on with the NRF_LOG_ENABLE define set to 1.

When i try to run my code with NRF_LOG_ENABLE set to 0 the nRF chip doesn't respond to SPI transaction anymore..

I suspect the wait_for_event() function below called after bootloader initialization:

static void wait_for_event()
{
    while (true)
    {
        app_sched_execute();
        if (!NRF_LOG_PROCESS())
        {
        #ifdef BLE_STACK_SUPPORT_REQD
            (void)sd_app_evt_wait();
        #else
            __WFE();
        #endif
        }
    }
}

When i remove the __WFE() call or run in debug with probe attached the code runs OK and the MCU get the SPI response.

What can i do to have the SPIS interruption triggered even after a WFE call ?

Related