actually, that functionality does exist on the ST processors. I just stumbled across it and remembered this post, and so wanted to record for posterity. Mind you I don't think it is exposed via dotNETMF, so it won't help you there, but nonetheless. If your curious, q.v:
http://www.st.com/st.../CD00225773.pdf
section 10.3.7
the noise problem cutlass referrs to is real, of course. ST lets you to cope allowing you to specify a band of voltage change, rather than a single.threshold.
10.3.7 Analog watchdog
The AWD analog watchdog status bit is set if the analog voltage converted by the ADC is below a lower threshold or above a higher threshold. These thresholds are programmed in the 12 least significant bits of the ADC_HTR and ADC_LTR 16-bit registers. An interrupt can be enabled by using the AWDIE bit in the ADC_CR1 register. The threshold value is independent of the alignment selected by the ALIGN bit in the ADC_CR2 register. The analog voltage is compared to the lower and higher thresholds before alignment.
Table33 shows how the ADC_CR1 register should be configured to enable the analog watchdog on one or more channels.
That function checks to see if the analog input is above or below specific programmed values. That's not exactly what the original poster asked for.
But , knowing the ADC noise factor, and knowing the current value, a big enough high and low value could be programmed in. Then, after an "ADC value change" interrupt, the guard band values could be updated.
So, with that feature, and some interrupt handling code, the function that the original poster asked for could be implemented. VERY NEAT!
Great find ziggurat29!
BTW, does anyone if there is a way we can read/write physical addresses directly in C# code with this .NETMF version?
IIRC, with C# and Windows, you use "unsafe" code.
http://msdn.microsof...y/tcy5wf0h.aspx
http://www.c-sharpco...UnsafeCode.aspx