cancel
Showing results for 
Search instead for 
Did you mean: 

How to use STM32L0xx 's Comparator in Stop mode?

DU2
Associate II

I want to use Comparator, for comparing external voltage with Vref in stop mode

so that if external voltage is more than Vref, wake up from stop mode and do something.

I read example code about Comparator, LPTIMER ... but they are not exact solution about my project

so Can you give some idea or example about Using Comparator in stop mode ?

1 ACCEPTED SOLUTION

Accepted Solutions
Danish1
Lead II

A thing about examples is that they are just that - examples. It is rare that one exactly matches your intended use.

What I recommend you to do is read relevant parts of the Reference Manual for your stm32l0xx. This is a huge document, but that's only because all these stm32 are amazingly powerful devices. It has sections on comparators and low-power modes. (I say this because I didn't get a clue as to whether or not you've studied this from your question).

My guess is that there will be separate control of VRef (perhaps in the section for the ADC) because VRef and any potential-dividers always burn power.

Hope this helps,

Danish

View solution in original post

1 REPLY 1
Danish1
Lead II

A thing about examples is that they are just that - examples. It is rare that one exactly matches your intended use.

What I recommend you to do is read relevant parts of the Reference Manual for your stm32l0xx. This is a huge document, but that's only because all these stm32 are amazingly powerful devices. It has sections on comparators and low-power modes. (I say this because I didn't get a clue as to whether or not you've studied this from your question).

My guess is that there will be separate control of VRef (perhaps in the section for the ADC) because VRef and any potential-dividers always burn power.

Hope this helps,

Danish