How to get 2.1uA with LoRa-E5 in low power mode?

I’ve found what the problem was: floating RX pin of UART. Since I use only TX for logging during debugging, RX is not used at all. When I initialized it as analog, consumption stays at 2.2uA, as it should be:

GPIO_InitTypeDef GPIO_InitStructure = {0};
GPIO_InitStructure.Pin = USARTx_RX_Pin;
GPIO_InitStructure.Mode = GPIO_MODE_ANALOG;
GPIO_InitStructure.Pull = GPIO_NOPULL;
HAL_GPIO_Init(USARTx_RX_GPIO_Port, &GPIO_InitStructure);

I found it by creating empty application which goes directly into Stop2 mode and never comes back. Current consumption was about 1.6uA. Then I was adding devices one-by-one in MX, recompiling, flashing and checking current consumption again. I could quickly isolate UART as a problem.

For the low consumption everything has to be physically disconnected from the module/board: debugger interface, UART etc and no pins have to be pulled up or down, unless it is strictly dictated by schematic. Device has to be power cycled after flashing - reset is not enough: it can leave device in a strange state with relatively high consumption, not sure what it is.

1 Like