Content originally posted in LPCWare by onkel.jack@t-online.de on Mon Dec 30 15:30:18 MST 2013
Marc,
Thanks for looking at that.
I just put some update in my last post.
Using same reference on both inputs is intended, just to make sure no noise is trouble me.
I also tried with max hsyeresis (30 mv I think) and different inputs, voltage ladder, I1 I2.
Still the same behaviour.
I spend a lot of time on the topic try out different approaches and also re-wrote the code from scratch,
always getting the same results.
The NXP stuff is in the sample zip and get pulled in by the Makefile.
The only symbol pulled from C runtime is __aeabi_uidiv, the unsigned interger division.
Unfortunately it is needed to calculate clock speed, otherwise it would link with -nostdlib
I did experiment a little further.
Interestingly, if ACMP configured and the pins tied to Vss/Vdd so that ACMP_O should be low,
I get a 70 us wide low pulse on ACMP_O then it switches back to high and the interrupt fired in a loop.
If I configure and tie the pins in a way ACMP_O is high, nothing happens, no pulse and no interrupt.
So, since output and interrupt both behaves in a similar strange way, I think its really a hardware problem.
But a confirmation still is highly welcome.