diff Small_CPU/Src/scheduler.c @ 937:d461d9e89e3c Evo_2_23

Compile switch for RTE sleep debug: there was already a compiler switch for enabling debugging while RTE is in sleep but the switches were distributed across the code => to make selection easier they are now part of the configuration.h
author Ideenmodellierer
date Tue, 10 Dec 2024 20:59:37 +0100
parents 3029f0332f4f
children 4a406e873a95
line wrap: on
line diff
--- a/Small_CPU/Src/scheduler.c	Sun Dec 08 22:03:07 2024 +0100
+++ b/Small_CPU/Src/scheduler.c	Tue Dec 10 20:59:37 2024 +0100
@@ -21,8 +21,6 @@
   */ 
 	
 	
-//#define DEBUGMODE
-
 /* Includes ------------------------------------------------------------------*/
 #include <string.h>
 #include "baseCPU2.h"
@@ -1115,7 +1113,7 @@
 	{
 		I2C_DeInit();
 
-#ifdef DEBUGMODE
+#ifdef ENABLE_SLEEP_DEBUG
 		HAL_Delay(2000);
 #else
 		RTC_StopMode_2seconds();
@@ -1189,12 +1187,13 @@
 			deepSleepCntDwn--;
 			if(deepSleepCntDwn == 0)
 			{
+				GPIO_GPS_OFF();
 				GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
 				GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
 				GPIO_InitStruct.Pull = GPIO_NOPULL;
 				GPIO_InitStruct.Pin = GPIO_PIN_All ^ (GPS_POWER_CONTROL_PIN | GPS_BCKP_CONTROL_PIN);
 				HAL_GPIO_Init( GPIOB, &GPIO_InitStruct);
-				GPIO_GPS_OFF();
+				__HAL_RCC_GPIOB_CLK_DISABLE();
 				uartGnss_SetState(UART_GNSS_INIT);
 			}
 		}