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

SPIS not working with nrf_pwr_mgmt_run

Hey all

In my current project I could set up an SPI communication, where the SPI-slave is on the nordic side. This works fine when I have __WFE() in my main loop, however when I replace __WFE() by nrf_pwr_mgmt_run() no SPI data is received anymore.

    while (true) // endless main loop
    {
        if(NRF_LOG_PROCESS() == false)
        {
//            __WFE();
            nrf_pwr_mgmt_run();
        }
    }

Can anyone give me a hint, why this does not work? And whats the

Parents
  • Hi

    In our SPIS example project, we enable constant latency mode on startup in order to mitigate this (see snippet below). It should also be okay to add a delay of ~10us between CS low and the first clock cycle for instance.

        // Enable the constant latency sub power mode to minimize the time it takes
        // for the SPIS peripheral to become active after the CSN line is asserted
        // (when the CPU is in sleep mode).
        NRF_POWER->TASKS_CONSTLAT = 1;

    Best regards,

    Simon

Reply
  • Hi

    In our SPIS example project, we enable constant latency mode on startup in order to mitigate this (see snippet below). It should also be okay to add a delay of ~10us between CS low and the first clock cycle for instance.

        // Enable the constant latency sub power mode to minimize the time it takes
        // for the SPIS peripheral to become active after the CSN line is asserted
        // (when the CPU is in sleep mode).
        NRF_POWER->TASKS_CONSTLAT = 1;

    Best regards,

    Simon

Children
No Data
Related