Mercurial > public > ostc4
changeset 917:0d6c4b40fae4 Evo_2_23
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.
author | Ideenmodellierer |
---|---|
date | Sun, 03 Nov 2024 15:37:00 +0100 |
parents | 4832981f9af8 |
children | f72613a152dd |
files | Small_CPU/Src/baseCPU2.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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); }