How to reduce the power consumption of the 9160‘s modem?

I am using 9160 to develop a customer's product, which needs to reduce power consumption as much as possible to prolong the battery life of the product. I know that 9160 communicates with the modem through the default UART0. My product design uses UART2 to communicate with a peripheral.  Setting UART2 to DEVICE_PM_LOW_POWER_STATE alone reduces the current by only about 30uA, whereas setting Uart0 to DEVICE_PM_LOW_POWER_STATE reduces the current by almost 500uA. What I can't understand is,  In fact, the GPIO pin mapped to UART0 is not connected to any line, why do you need to set the low power state to reduce power consumption?  

#define MODEM_DEV		"UART_0"
#define BLE_DEV			"UART_2"

	uart_ble = device_get_binding(BLE_DEV);
	if(!uart_ble)
	{
	#ifdef UART_DEBUG
		LOGD("Could not get %s device", BLE_DEV);
	#endif
		return;
	}

	uart_modem = device_get_binding(MODEM_DEV);
	if(!uart_modem)
	{
	#ifdef UART_DEBUG
		LOGD("Could not get %s device", uart_modem);
	#endif
		return;
	}
	
void uart_sleep_out(void)
{
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
	if(k_timer_remaining_get(&uart_sleep_in_timer) > 0)
		k_timer_stop(&uart_sleep_in_timer);
	k_timer_start(&uart_sleep_in_timer, K_SECONDS(UART_WAKE_HOLD_TIME_SEC), NULL);

	if(uart_is_waked)
		return;

#if 1	
	device_set_power_state(uart_ble, DEVICE_PM_ACTIVE_STATE, NULL, NULL);
	uart_irq_rx_enable(uart_ble);
	uart_irq_tx_enable(uart_ble);
	k_sleep(K_MSEC(10));
#else
	device_set_power_state(uart_modem, DEVICE_PM_ACTIVE_STATE, NULL, NULL);
	uart_irq_rx_enable(uart_modem);
	uart_irq_tx_enable(uart_modem);
	k_sleep(K_MSEC(10));
#endif	
	
	uart_is_waked = true;

#ifdef UART_DEBUG
	LOGD("uart set active success!");
#endif
#endif
}

void uart_sleep_in(void)
{
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
	if(!uart_is_waked)
		return;

#if 1	
	uart_irq_rx_disable(uart_ble);
	uart_irq_tx_disable(uart_ble);
	device_set_power_state(uart_ble, DEVICE_PM_LOW_POWER_STATE, NULL, NULL);
	k_sleep(K_MSEC(10));
#else
	uart_irq_rx_disable(uart_modem);
	uart_irq_tx_disable(uart_modem);
	device_set_power_state(uart_modem, DEVICE_PM_LOW_POWER_STATE, NULL, NULL);
	k_sleep(K_MSEC(10));
#endif
	
	uart_is_waked = false;

#ifdef UART_DEBUG
	LOGD("uart set low power success!");
#endif
#endif
}

Parents
  • duxinglang said:
    Do you mean 9160 does not need to use UART0 to communicate with modem?

    Yes.

    duxinglang said:
      However, previous tests showed that I did receive some log output about the network from UART0 while connecting to the network.

    The log output you are receiving comes from the modem via the modem library interface and then is forwarded to the terminal via UART0.

    Regards,

    Markus

  • So it's log output using uart0, right?  But when I test, I find that even though I have log output turned off (CONFIG_LOG= N), if I don't set UART0 to DEVICE_PM_LOW_POWER_STATE, it still has around 600uA power consumption, why?  

    # Log
    CONFIG_LOG=n
    CONFIG_LOG_IMMEDIATE=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=n
    CONFIG_LOG_DEFAULT_LEVEL=4
    CONFIG_LOG_MODE_OVERFLOW=y
    CONFIG_LOG_BACKEND_RTT_MODE_DROP=y
    CONFIG_LOG_BACKEND_SHOW_COLOR=n
    CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n

Reply
  • So it's log output using uart0, right?  But when I test, I find that even though I have log output turned off (CONFIG_LOG= N), if I don't set UART0 to DEVICE_PM_LOW_POWER_STATE, it still has around 600uA power consumption, why?  

    # Log
    CONFIG_LOG=n
    CONFIG_LOG_IMMEDIATE=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=n
    CONFIG_LOG_DEFAULT_LEVEL=4
    CONFIG_LOG_MODE_OVERFLOW=y
    CONFIG_LOG_BACKEND_RTT_MODE_DROP=y
    CONFIG_LOG_BACKEND_SHOW_COLOR=n
    CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n

Children
No Data
Related