You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/03/29 14:26:35 UTC

[GitHub] [incubator-nuttx] XinStellaris opened a new pull request #5904: boards/boardctl:a common boardctl to read reset cause.

XinStellaris opened a new pull request #5904:
URL: https://github.com/apache/incubator-nuttx/pull/5904


   Signed-off-by: 田昕 <ti...@xiaomi.com>
   
   ## Summary
   a common boardctl to read reset cause.
   
   ## Impact
   N/A
   
   ## Testing
   Vela tested, based on risc-v/esp32c3.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] no1wudi commented on pull request #5904: boards/boardctl:a common boardctl to read reset cause.

Posted by GitBox <gi...@apache.org>.
no1wudi commented on pull request #5904:
URL: https://github.com/apache/incubator-nuttx/pull/5904#issuecomment-1082562793


   Merge the two commits into one.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] XinStellaris closed pull request #5904: boards/boardctl:a common boardctl to read reset cause.

Posted by GitBox <gi...@apache.org>.
XinStellaris closed pull request #5904:
URL: https://github.com/apache/incubator-nuttx/pull/5904


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #5904: boards/boardctl:a common boardctl to read reset cause.

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #5904:
URL: https://github.com/apache/incubator-nuttx/pull/5904#discussion_r837707596



##########
File path: include/sys/boardctl.h
##########
@@ -403,6 +410,39 @@ struct boardioc_boot_info_s
 };
 #endif
 
+#ifdef CONFIG_BOARDCTL_RESET_CAUSE
+/* Describes the reason of last reset */
+
+enum boardioc_reset_cause_e
+{
+  BOARDIOC_RESETCAUSE_NONE = 0,
+  BOARDIOC_RESETCAUSE_SYS_CHIPPOR,      /* chip power on */
+  BOARDIOC_RESETCAUSE_SYS_RWDT,         /* RTC watchdog system reset */
+  BOARDIOC_RESETCAUSE_SYS_BOR,          /* brown-out system reset */
+  BOARDIOC_RESETCAUSE_CORE_SOFT,        /* software core reset */
+  BOARDIOC_RESETCAUSE_CORE_DPSP,        /* deep-sleep core reset */
+  BOARDIOC_RESETCAUSE_CORE_MWDT,        /* main watchdog core reset */
+  BOARDIOC_RESETCAUSE_CORE_RWDT,        /* RTC watchdog core reset */
+  BOARDIOC_RESETCAUSE_CPU_MWDT,         /* main watchdog cpu reset */
+  BOARDIOC_RESETCAUSE_CPU_SOFT,         /* software cpu reset */
+  BOARDIOC_RESETCAUSE_CPU_RWDT          /* RTC watchdog cpu reset */
+};
+
+enum boardioc_softreset_subreason_e
+{
+  BOARDIOC_SOFTRESETCAUSE_USER_REBOOT = 0,
+  BOARDIOC_SOFTRESETCAUSE_PANIC,
+  BOARDIOC_SOFTRESETCAUSE_ASSERT
+};
+
+struct boardioc_reset_cause_s
+{
+  enum boardioc_reset_cause_e cause;  /* The reason of last reset */
+  uint32_t flag;                      /* watchdog number when watchdog reset,
+                                         or soft-reset subreason */

Review comment:
       ```suggestion
     uint32_t flag;                      /* watchdog number when watchdog reset,
                                          * or soft-reset subreason */
   ```
   NxStyle expects that asterisk




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org