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

Increased idle current draw in nRF5340 when SPI4 chosen over SPI1

Platform: nRF5340-DK

Tools: I am using SDK 1.5.0 (but seen on earlier SDKs too)

Configuration: Using high speed spi pins whether for SPI1 or SPI4

&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
mosi-pin = <9>;
miso-pin = <10>;
sck-pin = <8>;
};

If I use SPI1 I see around 40uA idle current draw when running my application 

If I change to  use SPI4 I see around 640uA idle current draw when running my application.

See attached screenshots taken from the power profiler app.

I would like to use SPI4 to enable the higher data rates, so I can get the SPI transfers over quicker and hence save power

However the jump from 40uA to 640uA idle current makes this unworkable

I was expecting maybe slightly higher current during operation, but not a huge jump in current when idle.

Is this a known issue?

Parents
  • Hi Dominic,

    I will be taking a look at this and check if anyone in our team has seen similar things.

    I will also try to reproduce the issue. Is your application based on a sample?

  • Hi, no it is our own application, I don't believe there any samples that use spi in the SDK.

    I will try and craft a simple example using one of the samples, as I don't think you have to actually send any spi traffic to trigger the higher base load.

  • I have modified the simple binky sample on an nRF5340-DK using the 1.5.0 SDK version
    I erased the flash first so there is nothing running on the network core
    To trigger the extra idle current it just takes a single spi tx using SPI4
    The code is set to use spi4 currently, to change back to spi1, 3 files need to be changed

    1) Change '&spi4' to '&spi1' in nrf5340dk_nrf5340_cpuapp.overlay
    2) Change 'CONFIG_SPI_4=y' to 'CONFIG_SPI_1=y' in prj.conf
    3) Change SPI_DEVICE_NAME so that it references spi1 instead of spi4 in main.c

    Sorry, I probably could have made this easier with a KConfig option.

    If switching SPI interfaces in an active project, as project files have changed you need to then do:
    Project->Reload 'blinky'
    Project->Run Cmake
    Build->Build and Run

    On this particular project, with SPI4 interface active I see 750uA idle, but only 126uA idle with SPI1

    Hope this helps you reproduce the issue

    4846.blinky.zip

Reply
  • I have modified the simple binky sample on an nRF5340-DK using the 1.5.0 SDK version
    I erased the flash first so there is nothing running on the network core
    To trigger the extra idle current it just takes a single spi tx using SPI4
    The code is set to use spi4 currently, to change back to spi1, 3 files need to be changed

    1) Change '&spi4' to '&spi1' in nrf5340dk_nrf5340_cpuapp.overlay
    2) Change 'CONFIG_SPI_4=y' to 'CONFIG_SPI_1=y' in prj.conf
    3) Change SPI_DEVICE_NAME so that it references spi1 instead of spi4 in main.c

    Sorry, I probably could have made this easier with a KConfig option.

    If switching SPI interfaces in an active project, as project files have changed you need to then do:
    Project->Reload 'blinky'
    Project->Run Cmake
    Build->Build and Run

    On this particular project, with SPI4 interface active I see 750uA idle, but only 126uA idle with SPI1

    Hope this helps you reproduce the issue

    4846.blinky.zip

Children
Related