Mercurial > public > ostc4
changeset 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 | df87dbfc9c21 |
files | Common/Inc/configuration.h Small_CPU/Inc/baseCPU2.h Small_CPU/Src/scheduler.c |
diffstat | 3 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Common/Inc/configuration.h Sun Dec 08 22:03:07 2024 +0100 +++ b/Common/Inc/configuration.h Tue Dec 10 20:59:37 2024 +0100 @@ -93,4 +93,8 @@ /* Enable to have position sensor support active */ #define ENABLE_GPIO_V2 +/* Enable RTE sleep mode debugging */ +/* #define ENABLE_SLEEP_DEBUG */ + + #endif
--- a/Small_CPU/Inc/baseCPU2.h Sun Dec 08 22:03:07 2024 +0100 +++ b/Small_CPU/Inc/baseCPU2.h Tue Dec 10 20:59:37 2024 +0100 @@ -39,8 +39,6 @@ #ifndef BASE_CPU2_H #define BASE_CPU2_H -//#define DEBUGMODE - /* Includes ------------------------------------------------------------------*/ #include "stm32f4xx_hal.h" #include "settings.h"
--- 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); } }