nRF52833 System Off while connected (BLE LLPM) leads to bad off state

I am attempting to enter a sleep state (System Off) with a wakeup button .  I set all of my GPIO pins to the default config except for my wake up, configure the appropriate bit mask in the Sense module and then go to sleep:

// Set everything but the power button to an input and disable all sense lines
for (uint8_t idx = 0; idx < NUMBER_OF_PINS; idx++)
{
    if (idx == NRF_PIN_PHYS_FROM_DT_ALIAS(button_system))
        continue;

    nrf_gpio_cfg_default(idx); // Input, no pull up/down, no sense
}

// Wakeup on system button presses
nrf_gpio_cfg_input(NRF_DT_GPIOS_TO_PSEL(DT_ALIAS(button_system), gpios), NRF_GPIO_PIN_PULLUP);
nrf_gpio_cfg_sense_set(NRF_DT_GPIOS_TO_PSEL(DT_ALIAS(button_system), gpios), NRF_GPIO_PIN_SENSE_LOW);

// Go to sleep, waking up on sense input reboots the mcu
pm_state_force(0u, &(struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0});

This is using ncs v2.4.2, and the project is built with CONFIG_PM_DEVICE=y

This is a bit brute force, but it works... mostly.  If the radio (acting as a peripheral) is connected to the central (3mSec connection interval via LLPM) during the power off sequence, often (~75% of test cases) the power pin will not wake up the MCU, requiring the device to be power cycled. If the radio is first disconnected before power off, the wake-up nearly always succeeds (we believe we saw the issue reproduce once out of hundreds of cycles).

Additionally, monitoring the power consumption in the bad reproducing case shows that something inside the MCU is indeed turned on:

Whereas a successful power off power consumption looks like:


We would love any support or insight into what might be going on here.  Thanks!

Related