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

    I discussed this with a colleague, and this sems to be due to the SPIS having a longer wake-up time when waking up from sleep than most other peripherals. This is only documented in the nRF52832 PS, but is valid for the nRF52840 as well (we're working on getting it in a future revision).

    Please take this into consideration when waking the device up so that the SPIS peripheral is able to get started properly before starting operations.

    Best regards,

    Simon

Reply
  • Hi

    I discussed this with a colleague, and this sems to be due to the SPIS having a longer wake-up time when waking up from sleep than most other peripherals. This is only documented in the nRF52832 PS, but is valid for the nRF52840 as well (we're working on getting it in a future revision).

    Please take this into consideration when waking the device up so that the SPIS peripheral is able to get started properly before starting operations.

    Best regards,

    Simon

Children
  • Hello Simon
    Thanks for your efforts. This makes sense to me, regarding the behavior I've observed. What is not clear to me, where can I do that:

    take this into consideration when waking the device up so that the SPIS peripheral is able to get started properly before starting operations.

    Is this something in can configure somewhere? Or is this something the peer-device has to follow, so it has some delay after enabling the CS?

Related