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

NRF58122 using SPI with softdevice cannot sleep

I have a code using S110 with nrf51822

And I have a timer to trigger a SPI master get some data from module

It successful get the data from module (SPI) but the nrf51822 continuous costing around 5mA. (seem not sleep)

If I disable the SPI part, it be come normal.

Am i need to disable SPI while not in use? and How?

Parents
  • Yes, the SPI requires the high frequency clock and therefore will burn power even when not in use but enabled. I am using the nrf_drv_spi_uninit function in my SPI driver. But you could probably call nrf_spi_disable yourself, or even access the peripheral register directly using

    p_spi->ENABLE = (SPI_ENABLE_ENABLE_Disabled << SPI_ENABLE_ENABLE_Pos);
    
Reply
  • Yes, the SPI requires the high frequency clock and therefore will burn power even when not in use but enabled. I am using the nrf_drv_spi_uninit function in my SPI driver. But you could probably call nrf_spi_disable yourself, or even access the peripheral register directly using

    p_spi->ENABLE = (SPI_ENABLE_ENABLE_Disabled << SPI_ENABLE_ENABLE_Pos);
    
Children
No Data
Related