You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2021/05/23 18:43:07 UTC

[incubator-nuttx] 02/07: boards: spresense: Add delay only for PMIC GPO setting

This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 8b5425d661cb3fc6d03d35c95b1e7783959dadab
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed May 19 17:48:28 2021 +0900

    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 b1370c3..b957a3e 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);
         }