简体   繁体   English

脱离看门狗定时器 (WDT) 支持的主循环的推荐方法

[英]Recommended way to break out of a Watchdog Timer (WDT) supported main loop

I need to include hardware WDTs on both ESP32 and rp Pico based systems running micropython.我需要在运行 micropython 的基于 ESP32 和 rp Pico 的系统上包含硬件 WDT。 I am using the Thonny IDE and with an 8s timeout on the Pico I can interrupt (Cntrl-C) the system and quickly delete the main from the board.我正在使用 Thonny IDE,在 Pico 上有 8 秒超时,我可以中断 (Cntrl-C) 系统并快速从电路板上删除主电路。 This then allows me to continue development of the code.这让我可以继续开发代码。 This approach works with an 8s timeout but if I was working with much shorter delays I am not so sure that it would.这种方法适用于 8 秒的超时,但如果我使用更短的延迟,我不太确定它是否会。 My concern is getting stuck with a main.py I can't change?我担心的是我无法更改的 main.py 卡住了? Is there a better way anyone can recommend to handle this.有没有任何人可以推荐的更好的方法来处理这个问题。

Harry哈利
PS: Relative beginner with Python. The more I know, the more I know I don't! PS:相对初学者Python,越知道越不知道!

What works for me: add time.sleep() for 5 seconds in the beginning of your code where you can kill script from Thonny using CTRL+C before WDT has been initiated.对我有用的是:在代码开头添加 time.sleep() 5 秒,您可以在启动 WDT 之前使用 CTRL+C 从 Thonny 中终止脚本。 This way you dont need to delete file manually from board, you just stop it's execution before WDT这样你就不需要从板上手动删除文件,你只需在 WDT 之前停止它的执行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ESP32 上网络服务器循环的看门狗定时器错误 - Watchdog timer errors for loops for webserver on ESP32 导致ESP32随机停止并触发看门狗定时器重启的串行数据包 - Serial packets causing ESP32 to randomly halt and trigger watchdog timer reboot 我在使用esp32在arduino中执行简单任务时遇到此看门狗定时器错误 - I am getting this watchdog Timer error while doing a simple task in arduino with esp32 FreeRTOS 看门狗超时 - FreeRTOS watchdog timeout 任务看门狗被触发 - 任务没有及时重置看门狗 - Task watchdog got triggered - The tasks did not reset the watchdog in time 如何在 ESP32 中禁用“中断看门狗”或增加 ISR 时间限制? - How to disable 'interrupt watchdog' in ESP32 OR increase ISR time limit? 使用 ESP IDF 触发 ESP32 任务看门狗 - ESP32 Task watchdog got triggered using ESP IDF 任务看门狗被触发。/abort() 在核心 0 上的 PC 0x400de07b 上被调用 - Task watchdog got triggered./abort() was called at PC 0x400de07b on core 0 使用 WiFiClient.client.read() 在 ESP32 上下载文件失败——“任务看门狗”错误 - Downloading file on ESP32 using WiFiClient.client.read() fails -- "Task watchdog" error ESP8266 和 ESP32 之间使设备进入深度睡眠的推荐代码有何不同? - What is the difference in recommended code for putting device into deepsleep between ESP8266 and ESP32?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM