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.

  • Hi!

    No, setting %XDATAPRFL won't have a large impact as you can read from the application note:

    As Martin mentioned in the email thread, it looks like your CPU is still running. 

    However, I think the optimal situation for your use-case would be to keep the modem turned on, in power-saving mode, for lower overall power consumption. Turning the modem off means every time you want to transmit or receive, you need to turn the modem back on and re-attach to the network which takes a lot of power compared to having the modem in PSM, which has a floor-current of 4 uA. 

    You can use the lte_lc_psm_req(bool enable) function to go to or disable PSM. 

    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

1 2 3 4 5 »