I could decrease current consumption at v1.2.0, but couldn't at 1.3.0. 520uA flows in k_cpu_idle();
How can you do that?
Also, in v1.3.0, CONFIG_UART_0_NRF_UARTE is depricated. How can you disable UART 0 in prj.conf?
Any tip? Thanks
<environment>
- Windows10
- DK v0.9.0
- modem fw v1.2.0
- nrf v1.3.0
- Segger IDE 4.52
<prj.conf>
# General config CONFIG_ASSERT=y # Network CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y # BSD library CONFIG_BSD_LIBRARY=y # AT host library CONFIG_AT_HOST_LIBRARY=n CONFIG_UART_INTERRUPT_DRIVEN=n # Stacks and heaps CONFIG_MAIN_STACK_SIZE=3072 CONFIG_HEAP_MEM_POOL_SIZE=16384
<main.c>
/*
* Copyright (c) 2018 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
*/
#include <zephyr.h>
#include <stdio.h>
#include <drivers/uart.h>
#include <string.h>
/**@brief Recoverable BSD library error. */
void bsd_recoverable_error_handler(uint32_t err)
{
printk("bsdlib recoverable error: %u\n", err);
}
void disable_uart0(){
NRF_UARTE0->TASKS_STOPTX = 1;
while(NRF_UARTE0->EVENTS_TXSTOPPED == 0);
NRF_UARTE0->EVENTS_TXSTOPPED = 0;
NRF_UARTE0->TASKS_STOPRX = 1;
while(NRF_UARTE0->EVENTS_RXTO == 0);
NRF_UARTE0->EVENTS_RXTO = 0;
NRF_UARTE0->ENABLE = 0;
}
void main(void)
{
disable_uart0();
k_cpu_idle();
}