# HG changeset patch # User Ideenmodellierer # Date 1730644620 -3600 # Node ID 0d6c4b40fae420e14875958774ad8dd90d36a531 # Parent 4832981f9af8fbd115d83663a424500c01e52b15 Bugfix external interface power up after sleep: The previous implementation did not consider if the external power was enabled of not before sleep (the power was later enabled by sensor handling). The power is now activated immediatly after leaving sleep in order to aoid delays in sensor startup. diff -r 4832981f9af8 -r 0d6c4b40fae4 Small_CPU/Src/baseCPU2.c --- a/Small_CPU/Src/baseCPU2.c Mon Oct 28 20:34:58 2024 +0100 +++ b/Small_CPU/Src/baseCPU2.c Sun Nov 03 15:37:00 2024 +0100 @@ -292,6 +292,8 @@ uint8_t lastsecond = 0xFF; #endif + uint8_t extInterfaceActive = 0; + HAL_Init(); SystemClock_Config(); @@ -541,6 +543,7 @@ break; case MODE_SLEEP: + extInterfaceActive = externalInterface_isEnabledPower33(); externalInterface_SwitchUART(EXT_INTERFACE_UART_OFF); externalInterface_SwitchPower33(false); if (hasExternalClock()) @@ -562,7 +565,7 @@ MX_SPI1_Init(); SPI_Start_single_TxRx_with_Master(); - if(externalInterface_isEnabledPower33()) + if(extInterfaceActive) { externalInterface_SwitchPower33(true); }