Skip to content

Commit 09382e4

Browse files
committed
fw/soc/sf32lb52x/freertos: remove magic sleep
Instead, call flash_power_down_for_stop_mode() which will end up sending a NOP command to the flash to make sure it is left idle. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
1 parent 32a8fb5 commit 09382e4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/fw/soc/sf32lb/sf32lb52x/freertos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <inttypes.h>
55

66
#include "console/prompt.h"
7+
#include "drivers/flash.h"
78
#include "drivers/lptim_systick.h"
89
#include "drivers/mcu.h"
910
#include "drivers/rtc.h"
@@ -66,8 +67,7 @@ static void prv_enter_deepslep(void) {
6667

6768
prv_save_iser();
6869

69-
/* Wait flash cache idle */
70-
HAL_Delay_us(100);
70+
flash_power_down_for_stop_mode();
7171

7272
NVIC_EnableIRQ(AON_IRQn);
7373
NVIC_EnableIRQ(LPTIM1_IRQn);

0 commit comments

Comments
 (0)