.. _soc-module: SoC ====================== 本章节用于提供SoC运行层面的控制函数的使用方法,包括: - BROM预设行为控制 - :c:func:`soc_set_brom_flag` - SoC复位 - :c:func:`soc_reboot` - GPIO预设功能控制 - :c:func:`soc_norvcc_enable` - :c:func:`soc_norvcc_disable` - 看门狗控制 - :c:func:`soc_watchdog_start` - :c:func:`soc_watchdog_clear` - :c:func:`soc_watchdog_stop` API说明 ---------------------- .. c:enum:: brom_flag_t BROM预设行为控制位枚举定义。 - *BROM_Flag_FW_Update_Requst*: 软件发起固件升级请求。 - *BROM_Flag_Fast_Reboot*: 快速启动请求。 - *BROM_Flag_Hibernation_Wakeup*: 低功耗休眠模式唤醒标志。 .. c:function:: void soc_set_brom_flag(brom_flag_t bit) 控制BROM预设行为,下次SoC Reboot或Hibernate低功耗模式唤醒时生效。 :param bit: BROM预设行为控制位,通过枚举定义 :c:enum:`brom_flag_t` 选择。 :returns: 无 .. c:function:: void soc_norvcc_disable(void) 关闭GPIO19的预设Flash供电能力。 :returns: 无 .. c:function:: void soc_norvcc_enable(void) 使能GPIO19的预设Flash供电能力。 :returns: 无 .. c:function:: void soc_reboot(void) SoC复位。 :returns: 无 .. c:enum:: wdog_time_t 看门狗timeout时长枚举定义。 - *WDOG_Time_10ms* - *WDOG_Time_125ms* - *WDOG_Time_250ms* - *WDOG_Time_500ms* - *WDOG_Time_1s* - *WDOG_Time_2s* - *WDOG_Time_4s* - *WDOG_Time_8s* .. c:function:: void soc_watchdog_start(wdog_time_t wdog_time) 配置并启动看门狗。 :param wdog_time: 看门狗timeout时长设置,通过枚举定义 :c:enum:`wdog_time_t` 选择。 :returns: 无 .. c:function:: void soc_watchdog_clear(void) 喂狗看门狗。 :returns: 无 .. c:function:: void soc_watchdog_stop(void) 关停看门狗定时器。 :returns: 无