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

SPI current consumption.

Hi 

We are using nrf51822 with SDK 10 and softdevice s110. We completed the software and in general everything works fine. In the final step, we decided to add the peripheral device which needs SPI. In the main function, I added spi_master_init(&m_spi_master_0,false) method and I observed that the current increases for 300-400 uA additionally. I tried to enable and disable the SPI when it was needed and not needed but unfortunately, this does not work. The current did not change at all.  Does anybody know what is going on in this case? I read many posts that address this issue but I did not find any suitable solution.

Thanks in advance

Samo

Parents
  • Hi,

    Can you try to uninit the SPI and then write 0 followed by 1 to the POWER register (address 0xFFC)?

    Make sure the SPI is uninit (disabled) when doing this:

    If TWI0 or SPI0 is used:
    *(volatile uint32_t *)0x40003FFC = 0;
    *(volatile uint32_t *)0x40003FFC;
    *(volatile uint32_t *)0x40003FFC = 1;

    If TWI1 or SPI1 is used:
    *(volatile uint32_t *)0x40004FFC = 0;
    *(volatile uint32_t *)0x40004FFC;
    *(volatile uint32_t *)0x40004FFC = 1;

    This should confirm if it's the SPI that is the problem, or if there is another mode or peripheral that is causing the current consumption.

    Kenneth

  • thanks for the fast response. I added in my project (in which SDK 10 is used) the library nrf_drv_spi from SKD 11 and the functions enable and disable of SPI communication works like a charm. It seems that SDK 10 has some bugs regarding SPI communication which reflects in higher current consumption.

Reply Children
No Data
Related