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

GPIO and UART with low power consumption?

I am trying to run below 10 uA with code below while GPIO and uart are on. Sleep mode is applied (below 10 uA), and only wakes up when button is pressed (can be higher amps)

lfclk_config();
rtc_config();	
gpio_init();

uint32_t err_code;

    const app_uart_comm_params_t comm_params =
  {
      RX_PIN_NUMBER,
      TX_PIN_NUMBER,
      RTS_PIN_NUMBER,
      CTS_PIN_NUMBER,
      APP_UART_FLOW_CONTROL_ENABLED,
      false,
      UART_BAUDRATE_BAUDRATE_Baud115200
  };
		
		APP_UART_FIFO_INIT(&comm_params,
                     UART_RX_BUF_SIZE,
                     UART_TX_BUF_SIZE,
                     uart_error_handle,
                     APP_IRQ_PRIORITY_LOWEST,
                     err_code);

However, it still runs 2.5mA. Am I making some mistake here? thanks

Parents
  • Hi,

    If you have a look at app_uart_init() which is called by APP_UART_FIFO_INIT, you can find that nrf_drv_uart_rx_enable() is called by default.

    With RX enabled the UART will keep the 16Mhz oscillator running and the regulators in addition.

    Have you tried to call nrf_drv_uart_rx_disable() after you call APP_UART_FIFO_INIT to put the UART in idle mode ?

    What exactly inside the gpioi_init() ? Do you use GPIOTE pin interrupt ?

Reply
  • Hi,

    If you have a look at app_uart_init() which is called by APP_UART_FIFO_INIT, you can find that nrf_drv_uart_rx_enable() is called by default.

    With RX enabled the UART will keep the 16Mhz oscillator running and the regulators in addition.

    Have you tried to call nrf_drv_uart_rx_disable() after you call APP_UART_FIFO_INIT to put the UART in idle mode ?

    What exactly inside the gpioi_init() ? Do you use GPIOTE pin interrupt ?

Children
Related