From 75bf7382a2700e4926421825c8c985862d54f340 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 3 Oct 2022 19:37:01 -0400 Subject: [PATCH] We are mostly focused in standby, not in stop --- firmware/hw_layer/ports/stm32/stm32f4/mpu_util.cpp | 2 ++ firmware/hw_layer/ports/stm32/stm32f7/mpu_util.cpp | 3 +++ firmware/rusefi.cpp | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/firmware/hw_layer/ports/stm32/stm32f4/mpu_util.cpp b/firmware/hw_layer/ports/stm32/stm32f4/mpu_util.cpp index 3330091106..16da01850f 100644 --- a/firmware/hw_layer/ports/stm32/stm32f4/mpu_util.cpp +++ b/firmware/hw_layer/ports/stm32/stm32f4/mpu_util.cpp @@ -35,6 +35,7 @@ STOP mode for F7 is needed for wakeup from multiple EXTI pins. For example PD0, However, for F40X & F42X this may be useless. STOP in itself eats more current than standby. With F4 only having PA0 available for wakeup, this negates its need. */ +/* void stm32_stop() { // Don't get bothered by interrupts __disable_irq(); @@ -63,6 +64,7 @@ void stm32_stop() { // Lastly, reboot NVIC_SystemReset(); } +*/ /* * Standby for both F4 & F7 works perfectly, with very little current consumption. * Downside is that there is a limited amount of pins that can wakeup F7, and only PA0 for F4XX. diff --git a/firmware/hw_layer/ports/stm32/stm32f7/mpu_util.cpp b/firmware/hw_layer/ports/stm32/stm32f7/mpu_util.cpp index 08018d23a9..d4758f76f8 100644 --- a/firmware/hw_layer/ports/stm32/stm32f7/mpu_util.cpp +++ b/firmware/hw_layer/ports/stm32/stm32f7/mpu_util.cpp @@ -179,6 +179,7 @@ STOP mode for F7 is needed for wakeup from multiple EXTI pins. For example PD0, However, for F40X & F42X this may be useless. STOP in itself eats more current than standby. With F4 only having PA0 available for wakeup, this negates its need. */ +/* void stm32_stop() { SysTick->CTRL = 0; SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; @@ -206,6 +207,8 @@ void stm32_stop() { // Lastly, reboot NVIC_SystemReset(); } +*/ + /* Standby for both F4 & F7 works perfectly, with very little curent consumption. Downside is that theres a limited amount of pins that can wakeup F7, and only PA0 for F4XX. Cannot be used for CAN wakeup without hardware modificatinos. diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index e98c85d4d5..d4d279a81b 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -190,7 +190,7 @@ void runRusEfi() { #endif #if defined(STM32F4) || defined(STM32F7) - addConsoleAction("stm32_stop", stm32_stop); +// addConsoleAction("stm32_stop", stm32_stop); addConsoleAction("stm32_standby", stm32_standby); #endif