cancel
Showing results for 
Search instead for 
Did you mean: 

What is (minimum) power consumption when using TAMP input ?

Strooom
Senior

I am developing a low-power application and need to add a button-input. As the MCU (STM32WLE5) is in sleep (STOP2) most of the time (waking up by RTC every 30 seconds), the button press needs to trigger an interrupt which also wakes up the MCU.

FYI, my current board consumption in sleep is 1.4 uA

I cannot add a standard GPIO input, because the current consumption of the schmitt-triggers is too high, so I tried to use the TAMP input, as this seems to allow for low-power applications. The button simply switches PB3 (Tamp input 3) to GND.

I am able to get an interrupt from the button which wakes up the MCU from STOP2. However, the current consumption of the MCU in STOP2 still increased from 1.4 uA to 45uA

Here is my tamper pin setup :

    sTamper.Tamper                     = RTC_TAMPER_3;
    sTamper.Trigger                    = RTC_TAMPERTRIGGER_FALLINGEDGE;
    sTamper.NoErase                    = RTC_TAMPER_ERASE_BACKUP_DISABLE;
    sTamper.MaskFlag                   = RTC_TAMPERMASK_FLAG_DISABLE;
    sTamper.Filter                     = RTC_TAMPERFILTER_DISABLE;
    sTamper.SamplingFrequency          = RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024;
    sTamper.PrechargeDuration          = RTC_TAMPERPRECHARGEDURATION_1RTCCLK;
    sTamper.TamperPullUp               = RTC_TAMPER_PULLUP_ENABLE;
    sTamper.TimeStampOnTamperDetection = RTC_TIMESTAMPONTAMPERDETECTION_DISABLE;

Is this the lowest power consumption with this feature enabled, or could I do better ?  

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief III

Just - what is current, if you use/enable 1 exti pin ?

+

How often button is used ?

If only every...some day, why not set RTC wakeup on 3 sec , check button, then go sleep again.

So button press just needs 1..3 sec pressing, until reaction. But low average power consumption.

 

example: you set rtc wakeup on 1 sec: button press just max. 1 sec needed then.

cpu needs 30 us, to wake up, check, go sleep; and 10mA here; so average is 0.3 uA -> 1.7 uA average total.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
AScha.3
Chief III

Just - what is current, if you use/enable 1 exti pin ?

+

How often button is used ?

If only every...some day, why not set RTC wakeup on 3 sec , check button, then go sleep again.

So button press just needs 1..3 sec pressing, until reaction. But low average power consumption.

 

example: you set rtc wakeup on 1 sec: button press just max. 1 sec needed then.

cpu needs 30 us, to wake up, check, go sleep; and 10mA here; so average is 0.3 uA -> 1.7 uA average total.

If you feel a post has answered your question, please click "Accept as Solution".

Hi @AScha.3 ,

thanks for your advice. I decided to measure the power consumption (I am using Nordic Power Profiler Kit II).

So I changed to firmware to use PB3 as a EXTI GPIO and to my big surprise, this is working with no extra current consumption. So good news is that buttons are now working without extra power consumption, but I now I am confused because I was so convinced that any GPIO input would cause extra power consumption from the Schmitt Trigger as is mentioned in AN4899. So thank you and I will reread the application note to better understand how this all works.

Good.

I just checked in ds peripheral current - and it looks not so bad:

AScha3_0-1739647281180.png

 

If you feel a post has answered your question, please click "Accept as Solution".