We experienced an issue in production, in which about 40% of boards had excess current consumption by about 75uA. Root cause was found to be the PIN_CNF of a GPIO pin. During bootup we perform a test where we set the config using
nrf_gpio_cfg_output(MY_PIN);
nrf_gpio_pin_clear(MY_PIN);
and then we end the test by setting to what should be a low power configuration:
nrf_gpio_cfg_input(PDM_MIC_CLK_PIN, NRF_GPIO_PIN_NOPULL);
This corresponds to PIN_CNF = 0x00, as opposed to the default PIN_CNF of 0x02. Directly toggling the PIN_CNF between 0x00 and 0x02 causes the excess current consumption; i.e. the current consumption drops by about 75uA to expected values when it is set to 0x02. The difference between these two values is that the default value (0x02) has input disconnected while 0x00 has input connected. Typically this difference has no impact on current consumption, but for a subset of our boards this difference it critical to power consumption.
Is this a known issue? Is there another explanation for these results?
Other information:
- The pin is connected to a clock line of a digital PCM mic, which is powered off when we make the current measurement (all pins should be at 0V).
- During the test on bootup (and later during operation) we use the pin with the PDM mic using NRFX_PDM_DEFAULT_CONFIG(PDM_MIC_CLK_PIN, PDM_MIC_DATA_PIN); and nrfx_pdm_init(&_pdm_config, pdm_mic_event_handler); After we finish the test we call nrfx_pdm_stop(); then set the pins as inputs then call nrfx_pdm_uninit(); I haven't tested changes to this order (e.g. setting pins as inputs after the uninit call), but looking at the contents of each call I don't think it would matter.
- The NRF52840 is part of a module from Laird. I don't know the revision of the IC, but it was probably manufactured 12-24mo ago.