Hi again Alice
Having re-read UM11424 many times, especially section 14, I finally tried adding (1UL << 1) (BIAS) to the exclude_from_pd parameter and the wake-up now works as expected. i.e. > comparator reference (100mV) with 20uS pulse and the device wakes up. The missing magic appears to be that analogue bias needs to remain powered up. This is less than clear in UM11424 in the examples and is totally missing from fsl_power.h in
/**
* @brief Analog components power modes control during low power modes
*/
typedef enum pd_bits
{
kPDRUNCFG_PD_BODCORE = (1UL << 2),
kPDRUNCFG_PD_BODVBAT = (1UL << 3),
kPDRUNCFG_PD_FRO1M = (1UL << 4),
kPDRUNCFG_PD_FRO192M = (1UL << 5),
kPDRUNCFG_PD_FRO32K = (1UL << 6),
kPDRUNCFG_PD_XTAL32K = (1UL << 7),
kPDRUNCFG_PD_XTAL32M = (1UL << 8),
kPDRUNCFG_PD_PLL0 = (1UL << 9),
kPDRUNCFG_PD_PLL1 = (1UL << 10),
kPDRUNCFG_PD_COMP = (1UL << 13),
kPDRUNCFG_PD_GPADC = (1UL << 15),
kPDRUNCFG_PD_LDOGPADC = (1UL << 19),
kPDRUNCFG_PD_LDOXO32M = (1UL << 20),
kPDRUNCFG_PD_LDOFLASHNV = (1UL << 21),
kPDRUNCFG_PD_RNG = (1UL << 22),
kPDRUNCFG_PD_PLL0_SSCG = (1UL << 23),
/*
This enum member has no practical meaning,it is used to avoid MISRA issue,
user should not trying to use it.
*/
kPDRUNCFG_ForceUnsigned = 0x80000000U,
} pd_bit_t;
as you can see kPDRUNCFG_PD_BIAS is not defined which clearly it should be. This is with MCUXpresso 11.3.1. I know 11.4 has just been released and I haven't installed it yet to determine if this still exists as an omission.
So my exclude_from_pd = kPDRUNCFG_PD_COMP | (1UL << 1)
Can you please confirm that my solution is correct?
Bob