From 41f142c1120f52128599b69b1be1839ce2f6e4cb Mon Sep 17 00:00:00 2001 From: Hogthrob Date: Sun, 25 Aug 2019 20:47:19 +0200 Subject: [PATCH] Readded sleep code to make it work --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index f386d88..f8e909b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -164,7 +164,13 @@ int main() control_timer_start(CONTROL_FREQUENCY); wait(0.1); // necessary to prevent MCU from randomly getting stuck here if PV panel is connected before battery - // sleep_manager_lock_deep_sleep(); + + sleep_manager_lock_deep_sleep(); // required to have sleep returning. + /* + The mBed Serial class calls this internal during "attach", this is why it work with ThingSet Serial enabled even + without this statement. Might be an issue of the particular STM32F072 mBed code or may affect + also STM32L073 platforms on mBed + */ // the main loop is suitable for slow tasks like communication (even blocking wait allowed) time_t last_call = timestamp;