frank boddeke

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: mdot wakeup after deep sleep not reading PA_0 #12741
    frank boddeke
    Participant

    Hi Frank,

    Here is a solution:
    mDot* dot = mDot::getInstance();
    dot->setLogLevel(MTSLog::TRACE_LEVEL);
    if(dot->getStandbyFlag()){
    PWR->CSR &= ~PWR_CSR_EWUP;
    }

    Explanation:
    When the mdot is placed in deep sleep with wake on INTERRUPT or RTC_ALARM_OR_INTERRUPT, the only pin that can be used as the interrupt to wake it is PA_0. In that case, the bit below is set to one. So upon reset/power up, we need to clear that bit if we are coming out of standby(deep sleep) mode.

    From the ST Micro reference guide…
    “Bit 8 EWUP: Enable WKUP pin
    This bit is set and cleared by software.
    0: WKUP pin is used for general purpose I/O. An event on the WKUP pin does not wakeup the device from Standby mode.
    1: WKUP pin is used for wakeup from Standby mode and forced in input pull down configuration (rising edge on WKUP pin wakes-up the system from Standby mode).
    Note: This bit is reset by a system reset.”

    I will enter a ticket in our tracking system to provide a fix that will not require the user’s application to mess with it. Let me know if the above solution is reasonable fix for you in the mean time.

    Kind regards,
    Leon

    in reply to: mdot wakeup after deep sleep not reading PA_0 #12668
    frank boddeke
    Participant

    added an external 100k pullup to 5 volt:

    now reed 3.37 volt till sleep and from then on 1.39 volt and output as below. something is pulling down starting when going to deep sleep

    still no idea why the first (cold) startup is different from the startup after deep sleep

    Build: May 25 2016, 08:58:47
    changes 0 1
    changes 0 1
    changes 0 1
    changes 0 1
    changes 0 1
    changes 0 1
    changes 0 1
    changes 0 1
    changes 0 1
    changes 0 1
    Build: May 25 2016, 08:58:47
    changes 0 0
    changes 33403 0
    changes 66763 0
    changes 100220 0
    changes 133611 0
    changes 166794 0
    changes 200154 0
    changes 233781 0
    changes 267399 0
    changes 301376 0

Viewing 2 posts - 1 through 2 (of 2 total)