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

M33 core in nRF9160 low power mode - Constant latency mode

Hello, I am working on low power modes of MCU M33 core in nRF9160 SOC.

From the document of nRF9160 product specification v1.0, understood that there are two low power modes for M33 core 

1. System ON Mode

     a. Low power mode - Default mode after reset

     b. Constant Latency mode.

2.System OFF Mode - The device is put into System OFF mode using the REGULATORS register interface.

As you suggested in my previous case Case ID: 246126, In serial Link monitor example code, I found enter_sleep() function which is actually System OFF Mode.

I have changed the enter_Sleep() function to enter into system ON mode instead of System OFF mode as in the example.

Below are my code which I am trying to wake up using GPIO button from system ON mode - low power mode but not successful.

When I checked the TASKS_LOWPWR register in embedded segger studio mode, the value in this register is still 0  though I am writing 1 to this register using nrf_power_task_trigger(NRF_POWER_NS,NRF_POWER_TASK_LOWPWR) API

I have also checked operation of the System ON mode - Constant Latency Mode, TASKS_CONSTLAT register is still 0.

void enter_sleep(void)
{

nrf_gpio_cfg_input(CONFIG_SLM_INTERFACE_PIN,
NRF_GPIO_PIN_PULLUP);
nrf_gpio_cfg_sense_set(CONFIG_SLM_INTERFACE_PIN,
NRF_GPIO_PIN_SENSE_LOW);


lte_lc_power_off();
bsd_shutdown();
nrf_power_task_trigger(NRF_POWER_NS,NRF_POWER_TASK_LOWPWR);

}

Can you guide me how to enable these modes- low power and contant latency mode.

Parents
  • Hi Heidi,

    Yesterday I followed your suggestion and turned OFF logging feature and disable UART peripheral. Current consumption i was able to land is

    System ON Mode-Idle Mode : 2.93mA

    System OFF Mode - 5.42uA.

    Still not matching to datasheet values.

    Let me know if you need further details.

  • Hi, could I take a look at your code?

    Based on the values you're getting, it looks like the modem is still running when in System ON Mode. Is this intended? If yes, you will need to implement PSM or eDRX intervals to reduce power consumption. 

    Best regards,

    Heidi

  • Hi Heidi,

    Yeah, I just replied to that mail chain.

    Again here I am copying the same :-)

    Still we are not clear on the end application use case( Modem should be ON with PSM or completely OFF), as of now we want to evaluate power consumption of M33 core. May be after getting hands on low power states of M33 core in SoC, we will evaluate Modem ON Idle mode with PSM, Modem ON idle mode without PSM then conclude the best possible approach.

    We are working in gas meter application. We have two modes of operation

    1. TCP client mode we call it as CALL-IN mode.

    2.TCP server mode we call it as CALL-OUT mode/continuous server mode.

    In CALL-IN mode we are not always connected to network, we will turn of the radio. If we get request from gas meter to connect to network and transfer the data to headend system(cloud), we will wakeup M33 core and turn on nRF9160 radio in SoC, register to network,  transfer data to cloud then switch off the radio and move the M33 core to sleep.For this use case we are trying to evulate sleep modes in M33 core.

    As martin suggested approach is good and best suited for our CALL-IN mode. We will consider it but before we want to have a hands on sleep mode in M33 core in SoC.

    Coming to CALL-OUT mode or continuous server mode, nRF9160 radio will always connected to network and with eDRX enabled. If there is no data transaction on the network, nRF9160 will move to eDRX  mode and M33 core should also move to sleep mode. If a remote client connection request comes to radio nRF9160 in paging time window, radio internally should wake up M33 core for processing data received.

  • Hi!

    Okay, I understand. I received help from a colleague to fix a few things in the code you sent over: 

    Could you try this instead and see if it helps with the power consumption?

    I missed a note at the bottom of the CPU Idling documentationDo not use these APIs unless absolutely necessary. In a normal system, the idle thread takes care of power management, including CPU idling.

    According to the Zephyr Threads documentation if all threads are unready, the Zephyr idle thread will set the CPU in System ON Idle. So it will either happen automatically, or you can set k_sleep() for a certain amount of time. More information on the idle thread can be found here.

    Which is why this function has been removed from the code. 

    Best regards,

    Heidi

  • Hi Heidi,

    I have tried the code given COmmon_fixed.c and 1641.prj.txt and measured current.

    It is around 2.92mA

  • I have uploaded my complete project.Please rename file extension to *.zip and extract the project.

    Could you please let me know where I m going wrong

  • Hi, if you're still seeing 2.92 mA, it's probably because one of the threads in the project isn't going to sleep, hence not allowing the idle thread to enter system idle mode.

    I'm trying to build the project and then using SES debugging to see if this is the case, but I'm having trouble opening the project in SES. I was able to build it using the command line (west build) but I did see a few warnings.

    What NCS tag are you using? 

Reply
  • Hi, if you're still seeing 2.92 mA, it's probably because one of the threads in the project isn't going to sleep, hence not allowing the idle thread to enter system idle mode.

    I'm trying to build the project and then using SES debugging to see if this is the case, but I'm having trouble opening the project in SES. I was able to build it using the command line (west build) but I did see a few warnings.

    What NCS tag are you using? 

Children
  • I am in master branch. attached YML file

  • Hi Heidi,

    What I observed is that if I commented  bsd_shutdown(); in my project, I am able to see the average current consumption is around 8uA.

    I am not able to understand the behavior why after commenting bsd_shutdown, current drooped to 8 uA.

  • Perhaps shutting down BSD lib was preventing one of the threads from going to sleep? I will have a closer look today. 

    Side note: when you're measuring on the DK, VDD IO should be set to 3V to get 4uA as the floor current in PSM. It's a workaround for a current leak that occurs if VDD IO is in 1.8 V.

  • Hi,

    Thanks for info, but at present I didn't enabled PSM I nRF9160.

  • Hi, you should still sett VDD IO to 3V as you could be losing ~3 uA from leakage.