File tree 1 file changed +6
-5
lines changed
connectivity/drivers/lora/TARGET_STM32WL
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ SPDX-License-Identifier: BSD-3-Clause
38
38
#include " ThisThread.h"
39
39
#include " Timer.h"
40
40
#include " STM32WL_LoRaRadio.h"
41
+ #include " mbed_wait_api.h"
41
42
42
43
#ifndef DEBUG_STDIO
43
44
#define DEBUG_STDIO 0
@@ -728,19 +729,19 @@ void STM32WL_LoRaRadio::wakeup()
728
729
void STM32WL_LoRaRadio::sleep (void )
729
730
{
730
731
DEBUG_PRINTF (" STM32WL_LoRaRadio::sleep\n " );
731
- #if MBED_CONF_STM32WL_LORA_DRIVER_SLEEP_MODE == 1
732
- // cold start, power consumption 160 nA
733
- sleep_state = 0x00 ;
734
- #endif
735
732
736
733
/* switch the antenna OFF by SW */
737
734
set_antenna_switch (RBI_SWITCH_OFF);
738
735
Radio_SMPS_Set (SMPS_DRIVE_SETTING_DEFAULT);
739
736
740
-
737
+ #if MBED_CONF_STM32WL_LORA_DRIVER_SLEEP_MODE == 1
738
+ // cold start, power consumption 160 nA
739
+ uint8_t sleep_state = 0x00 ;
740
+ #else
741
741
// warm start set , power consumption 600 nA
742
742
uint8_t sleep_state = 0x04 ;
743
743
write_opmode_command (RADIO_SET_SLEEP, &sleep_state, 1 );
744
+ #endif
744
745
745
746
_operating_mode = MODE_SLEEP;
746
747
rtos::ThisThread::sleep_for (2ms);
You can’t perform that action at this time.
0 commit comments