-
进入深度睡眠唤醒后程序会重新运行 sos
MCU 型号: HC32L170JATA 问题:程序通过[color=#cccccc][backcolor=rgb(31, 31, 31)][font=Consolas, "] [/font][/backcolor][/color][color=rgb(220, 220, 170)][backcolor=rgb(31, 31, 31)][font=Consolas, "]Lpm_GotoDeepSleep[/font][/backcolor][/color][color=#cccccc][backcolor=rgb(31, 31, 31)][font=Consolas, "]([/font][/backcolor][/color][color=rgb(86, 156, 214)][backcolor=rgb(31, 31, 31)][font=Consolas, "]FALSE[/font][/backcolor][/color][color=#cccccc][backcolor=rgb(31, 31, 31)][font=Consolas, "])[/font][/backcolor][/color]进入深度休眠,通过低功耗定时器 LpTim0 唤醒,但是唤醒后程序会重新运行,大家有遇到过这个情况吗,可能是什么原因造成的。具体代码如下。 [color=#cccccc][backcolor=rgb(31, 31, 31)][font=Consolas, "][color=#6a9955]/******************************************************************************[/color] [color=#6a9955] ** [/color][color=#569cd6]\brief[/color][color=#6a9955] 深度休眠处理函数[/color] [color=#6a9955] ** [/color] [color=#6a9955] ** [/color][color=#569cd6]@param[/color][color=#6a9955] [/color][color=#9cdcfe]无[/color] [color=#6a9955] ** [/color][color=#569cd6]\retval[/color][color=#6a9955] 无[/color] [color=#6a9955] **[/color] [color=#6a9955]******************************************************************************/[/color] [color=#569cd6]void[/color] [color=#dcdcaa]app_deep_sleep_handle_func[/color]([color=#569cd6]void[/color]) { [color=#c586c0]if[/color]([color=#9cdcfe]s_wakeup_status[/color].[color=#9cdcfe]enter_sleep_en[/color] [color=#d4d4d4]!=[/color] [color=#4fc1ff]SLEEP_EN[/color]) { [color=#c586c0]return[/color]; } [color=#6a9955] /*休眠参数配置*/[/color] [color=#9cdcfe]s_wakeup_status[/color].[color=#9cdcfe]enter_sleep_en[/color] [color=#d4d4d4]=[/color] [color=#4fc1ff]SLEEP_DEFAULT[/color]; [color=#dcdcaa]App_LPTimerInit[/color](); [color=#dcdcaa]Lptim_Cmd[/color]([color=#569cd6]M0P_LPTIMER0[/color], [color=#569cd6]TRUE[/color]);[color=#6a9955] //LPT 运行[/color] [color=#6a9955] /*IO休眠状态配置*/[/color] [color=#dcdcaa]App_LowPowerModeGpioSet[/color](); [color=#dcdcaa]app_sleep_gpio_release[/color](); [color=#dcdcaa]app_sleep_uart_release[/color](); [color=#dcdcaa]app_sleep_adc_release[/color](); [color=#6a9955]//进入深度睡眠模式[/color] [color=#dcdcaa]Lpm_GotoDeepSleep[/color]([color=#569cd6]FALSE[/color]); [color=#c586c0]while[/color] ([color=#b5cea8]1[/color]) { [color=#c586c0]if[/color]([color=#9cdcfe]s_wakeup_status[/color].[color=#9cdcfe]wakeup_reason[/color] [color=#d4d4d4]!=[/color] [color=#4fc1ff]WAKEUP_REASON_DEFAULT[/color]) { [color=#c586c0]break[/color]; } } } [color=#6a9955]/**[/color] [color=#6a9955] ******************************************************************************[/color] [color=#6a9955] ** [/color][color=#569cd6]\brief[/color][color=#6a9955] LPTIMER中断服务函数[/color] [color=#6a9955] **[/color] [color=#6a9955] ** [/color][color=#569cd6]\return[/color][color=#6a9955] 无[/color] [color=#6a9955] ******************************************************************************/[/color] [color=#569cd6]void[/color] [color=#dcdcaa]LpTim0_IRQHandler[/color]([color=#569cd6]void[/color]) { [color=#c586c0]if[/color] ([color=#569cd6]TRUE[/color] [color=#d4d4d4]==[/color] [color=#dcdcaa]Lptim_GetItStatus[/color]([color=#569cd6]M0P_LPTIMER0[/color])) { [color=#6a9955]// Gpio_WriteOutputIO(LORA_POWER_EN_PORT,LORA_POWER_EN_PIN,TRUE);[/color] [color=#9cdcfe]s_wakeup_status[/color].[color=#9cdcfe]wakeup_reason[/color] [color=#d4d4d4]=[/color] [color=#4fc1ff]WAKEUP_TIMER[/color]; [color=#6a9955]//s_wakeup_status.enter_sleep_en = SLEEP_EN;[/color] [color=#dcdcaa]Lptim_ClrItStatus[/color]([color=#569cd6]M0P_LPTIMER0[/color]);[color=#6a9955]//清除LPTimer的中断标志位[/color] } } [/font][/backcolor][/color]
598浏览量 0回复量 关注量 -
小华官网下载的开发板文件,怎么才能打开呢?
现在需要HC32L176的参考电路图,从官网找到对应开发板的资料,但下载解压后文件类型是 “0”,用kicad和protel99都打不开,怎么搞呢? 哪里能找到参考电路图呢?往指点。
904浏览量 1回复量 关注量