Hi, I'm trying to implement a mesh serial node with LPN capability, where the UART can be disabled to save power, and then re-enabled via a GPIO.
I am measuring current using an ammeter attached to P22 on an nRF52833-DK - the DK is powered via the USB IF MCU (I understand this is not optimal - but at this time I just need rough figures). The voltage at P22 is 3v
With nrf_mesh_serial_enable() and nrf_mesh_serial_enable() excluded from the build at compile time the LPN is able to create a friendship with a friend node at at this point the current consumption is < 10uA
With nrf_mesh_serial_enable() and nrf_mesh_serial_enable() included in the build the UART interface operates correctly, and current consumption when friendship is established is around 500uA
I created a UART opcode to call the function below (which I copied from the mesh bootloader)
uint32_t serial_handler_uart_disable(void)
{
/* Disable the IRQ and restore default values of serial registers. */
NVIC_DisableIRQ(UART0_IRQn);
NRF_UART0->INTENCLR = 0xFFFFFFFF;
NRF_UART0->TASKS_STOPRX = 1;
NRF_UART0->TASKS_STOPTX = 1;
NRF_UART0->ENABLE = 0x00000000;
return NRF_SUCCESS;
}
After calling this function the current consumption falls from 500uA to 200uA.
My question is why is the current still 200uA and not 10uA or lower - what other action do I need to take to lower the current consumption to what it is if the UART is never initialized (i.e. excluded from the build).
thanks !