From 8b5425d661cb3fc6d03d35c95b1e7783959dadab Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 May 2021 17:48:28 +0900 Subject: [PATCH] boards: spresense: Add delay only for PMIC GPO setting When RTC clock is still unstable, add a delay time only for PMIC GPO setting to avoid a problem that the setting is not reflected. --- boards/arm/cxd56xx/spresense/src/cxd56_power.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_power.c b/boards/arm/cxd56xx/spresense/src/cxd56_power.c index b1370c37e8..b957a3e6a7 100644 --- a/boards/arm/cxd56xx/spresense/src/cxd56_power.c +++ b/boards/arm/cxd56xx/spresense/src/cxd56_power.c @@ -206,9 +206,9 @@ int board_power_control(int target, bool en) { ret = pfunc(PMIC_GET_CH(target), en); - /* If RTC clock is unstable, delay 1 tick for PMIC setting. */ + /* If RTC clock is unstable, delay 1 tick for PMIC GPO setting. */ - if (!g_rtc_enabled) + if (!g_rtc_enabled && (PMIC_GET_TYPE(target) == PMIC_TYPE_GPO)) { usleep(1); }