Hi,
Are there any sample code to put M33 MCU in nRF9160 SOC in sleep mode (Imcuoffo).
With regards,
Praveen Palaparthi
Hi,
Are there any sample code to put M33 MCU in nRF9160 SOC in sleep mode (Imcuoffo).
With regards,
Praveen Palaparthi
Hi!
How to put the MCU in system off mode is shown in the Serial LTE Modem sample, with the enter_sleep() function.
Best regards,
Heidi
Hi Heidi,
Thank you for pointing me to serial LTE modem sample code,
In the SLM example code, where does the macro CONFIG_SLM_CONNECT_UART_0 is defined.In the documents mentioned that this macro is default enabled. Could you please point me to the file where it is defined.There are few other macros too which like CONFIG_SLM_AT_HOST_TERMINATION,
Thank you very much in advance.
With regards,
Praveen P
Hi!
In the Kconfig file in the SLM folder, see an excerpt below. The other macro you mentioned is also defined there.
choice prompt "UART for Interconnect" default SLM_CONNECT_UART_0 help Sets the UART to use for interconnect - UART 0 - UART 1 - UART 2 config SLM_CONNECT_UART_0 bool "UART 0" config SLM_CONNECT_UART_1 bool "UART 1" config SLM_CONNECT_UART_2 bool "UART 2" endchoice
Hi Praveen,
I assume you will not use the nrf9160 for a Serial modem (thin modem) and can overlook the SLM functionality in what was described earlier.
Here is the documentation for System OFF mode for the M33.
To just put the MCU to SYSTEM OFF mode you can use the three functions in the snippet shared earlier.
#include <lte_lc.h>
#include <bsd.h>
#include <hal/nrf_regulators.h>
void enter_sleep(void)
{
/*
* The LTE modem also needs to be stopped by issuing a command
* through the modem API, before entering System OFF mode.
* Once the command is issued, one should wait for the modem
* to respond that it actually has stopped as there may be a
* delay until modem is disconnected from the network.
* Refer to infocenter.nordicsemi.com/.../
* pmu.html?cp=2_0_0_4_0_0_1#system_off_mode
*/
nrf_regulators_system_off(NRF_REGULATORS_NS);
}
Please follow the links for more info on each.
In order to implement power management API's do we need to create a operate thread or can we implement in system Idle thread in idle.c file.