Did not tested VLADREF bit. PCB is now under test and is running 24/7 from june. I do not want ruin that uptime. Another version of pcb will arrive next week. I will test it and let you know (changes on pcb are not related to comparator, I forget some mounting holes).
Pros: It works stable now
Cons: Undocumented "hack" on sample of 1
Problem Solved (probably)
You must power-up one strange peripherial named VDDADIV_PD. Even in lpcxpresso is remark "what is this for ?"
Just clear SYSCON->PDRUNCFG bit nr. 19.
Defined as SYSCTL_POWERDOWN_VDDADIV_PD in lpcopen (not a single reference to this symbol in library).
For sleep modes check PDAWAKECFG register too.
No idea why...
(future testing required)
Did you find that my dumb luck or was there a reason you tried it?
I've just done a text search for VDDADIV_PD in the manual and it appears NOWHERE else except in the description for bit 19 of PDRUNCFG and PDWAKECFG, and it doesn't say it has anything to do with the comparator!
It does say "Voltage ladder can be separately powered down for applications only requiring the comparator function", but doesn't tell you how to. And from the way it is worded, one would expect it to be normally powered UP.
Thanks for the warning. I was about to use the comparators in a switched-mode supply-type application.
Did you observe any differences in changing the DLY (delay) settings?
If you read the datasheet you will see a current consumption of 38uA and a propagation delay of 24ns - doesn't that seem rather too good? The best Texas can manage in standalone comparators for that power consumption is 250ns, and most of their low-power comparators are >5us.
Limit on my setup is around 5kHz (!!!!) triangle shaped input signal. Any faster and comparator is stuck on high level. Delay settings, clock settings, pin filter settings - no positive effect. Chip is 64pin lpc1549, comparator output is routed to to pin via swm. Interrupt from comparator is affected too. Same results on comparator #0, and #2. I am out of ideas.
There seems to be quite a bit of stuff AFTER the comparator (p527 of the manual). I wonder if it's a perfectly good comparator, and this is messing it about. I seem to remember having a go with the comparators in the LPC800 and not coming across any problems, and the LPC8 and LPC15 have much the same peripherals.
How did you set CLKDIV? (and bit 30 of SYSAHBCLKCTRL0), and PDRUNCFG?
I would like to confirm findings of p.h.v.heumen.
I also faced large propagation delays on ACMP1 and ACMP2 with LPC1549(LQFP100). I did not make a special test setup to investigate deeper but I found that edges are missing on the ACMP1.IN3 and ACMP2.IN3.
Than I routed the ACMP output to a pin and confirmed that some of the pulses shorter than 100 us are missed.
Bypassing the ACMP solved the problem.
However in the datsheet it is specified that the propagatiopn delay of ACMP is 250 ns in the worst case.
I am also interested in finding the root cause of this behaviour.