You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/11/01 01:20:41 UTC
[incubator-nuttx] 01/03: boards: cxd56xx: Fix power-off time of video driver
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 9a8576911f4bc72e774d0b0abadd975a2bc0c718
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Mon Oct 31 20:23:41 2022 +0900
boards: cxd56xx: Fix power-off time of video driver
Add a power-off time for image sensor by the device specification.
---
boards/arm/cxd56xx/common/src/cxd56_isx012.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/boards/arm/cxd56xx/common/src/cxd56_isx012.c b/boards/arm/cxd56xx/common/src/cxd56_isx012.c
index 553b3fcb95..4178d960c9 100644
--- a/boards/arm/cxd56xx/common/src/cxd56_isx012.c
+++ b/boards/arm/cxd56xx/common/src/cxd56_isx012.c
@@ -51,10 +51,11 @@
# error "IMAGER_SLEEP must be defined in board.h !!"
#endif
-#define STANDBY_TIME (600*1000) /* TODO: (max100ms/30fps)*/
-#define DEVICE_STARTUP_TIME (6*1000) /* ms */
-#define SLEEP_CANCEL_TIME (13*1000) /* ms */
-#define POWER_CHECK_TIME (1*1000) /* ms */
+#define STANDBY_TIME (600 * 1000) /* TODO: (max100ms/30fps)*/
+#define DEVICE_STARTUP_TIME (6 * 1000) /* ms */
+#define SLEEP_CANCEL_TIME (13 * 1000) /* ms */
+#define POWER_CHECK_TIME (1 * 1000) /* ms */
+#define POWER_OFF_TIME (50 * 1000) /* ms */
#define POWER_CHECK_RETRY (10)
@@ -103,6 +104,10 @@ int board_isx012_power_off(void)
return -ENODEV;
}
+ /* Need to wait for power-off to be reflected */
+
+ nxsig_usleep(POWER_OFF_TIME);
+
ret = -ETIMEDOUT;
for (i = 0; i < POWER_CHECK_RETRY; i++)
{