Hi,
We are configuring the analog comparator as a wake up source for power down mode in our LPC5528, and it works consistently in some units but it does not work at all in some others.
The software code is the same, and so far we couldn't find any hardware reason for the ones that don't work.
- Comparator configuration (COMP register): hysteresis enabled, VDDA as input voltage (2.8V), low power enabled, PMUX set to VREF and NMUX to pin PIO0_0, VREF set to 1 (~100mV) and default filtering.
- Comparator interrupt configuration (COMP_INT_CTRL): Rising edge.
- Power down configuration: WAKEUP_ACMP_CAPT selected as wake up source and kPDRUNCFG_PD_COMP excluded from power down (among others).
We've verified using SEGGER Ozone that registers are properly set. And we've also verified that VREF is 2.8V during power down mode, and that PIO0_0 changes from 0V to ~200mV. This triggers wakeup in some units but does not in some others.
The units that does not wake-up on comparator interrupt can wake-up using the other wake-up sources we configure, so it seems to be a problem only with the analog comparator.
Please let me know if you need more details. We'd appreciate any help.
Thanks,
Paula
Hi again,
We fixed the problem. Apparently we were not configuring power down properly, and that caused undefined behavior that worked in some units but not in others.
Once the power down configuration was fixed, all units could consistently wakeup on comparator.
Thanks for your support,
Paula
Hi XiangJun,
Thanks for your reply.
I forgot to mention that we considered the hysteresis voltage and tried with hysteresis disabled, but it didn't solve the problem. We assume that hysteresis is not applied if we disable it, is that the case?
Best,
Paula
Hi,
Can you connect the CMP0_OUT pin to a scope and check if the CMP0_OUT signal toggles if you change the input voltage on the CMP0 input pin?
Hope it can help you
BR
XiangJun Rong
Hi,
We've configured PIO0_1 as CMP0_OUT and signal looks fine in the devices that work but there are no changes in the devices that do not work.
We've also checked the behavior of the PIO0_0 signals in both devices and they look exactly the same.
But we've realized that we need to apply ~16 times more voltage to PIO0_0 in the devices that do not work to be able to wake up . In numbers:
- VDDA: 2.8V
- VREF ladder: 1 (~100mV)
Some devices wake up at ~200mV, but some require ~1.6V.
Best,
Paula
Hi,
You set the Vref ladder as 100mV, but the HYST voltage is about 100mV to 200mV, so the comparator output changing is not reliable, the interrupt is not reliable accordingly.
I suppose that you can set the Vref ladder as 1.67V, if you input voltage on the PIO0_0 pin from GND to VDDA, then check if you can wake-up the chip reliably?
Hope it can help you
BR
XiangJun Rong