cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L051C8 comparator consumption

Ufoit
Associate II

Hi,

I have a strange problem on an STM32L051C8 with the comparators enabled in window mode.
If I put the system in stop about 20 seconds after powering the microcontroller, the current draw is about 250 uA. If I then exit the stop mode with a soft reset and put the system back to stop after 20 seconds (without removing the power), the current draw is 0.42 uA.
The comparator is initialized in ultra_low_power mode with interrupt enabled to exit the stop mode.
What can I look at?
Thanks

3 REPLIES 3
Ufoit
Associate II

ok, even if I haven't been able to verify it yet, it seems that it is just a problem in the input divider of the comparator which is close to the minimum working threshold...

Hello Ufoit,

Can you check if there are any pending interrupts before entering stop mode?

BR,

Ufoit
Associate II

Now I have a different problem.

I put the system to stop with the comparator IRQ enabled. After about 2 seconds, I receive an IRQ that systematically wakes the micro from stop without any change in the comparator voltages. If I set the comparator speed mode to High (previously Low), this problem no longer occurs.

(This doesn't happen on another board with almost the same components but a different layout either.)

Is this normal?