Partly because of that, partly because of curiosity, we continued to study WDT registers. Note that ets_* functions cannot be used on RTOS SDK. ROM does not provide a function to feed WDT, but invoking ets_wdt_restore(desired_mode) will re-configure WDT with previously saved interval and restart it. In interrupt mode, WDT asserts interrupt number 8, it is possible to install custom handler with ets_isr_attach(). WDT is configured for 2-stage operation, both intervals from arg2. WDT is configured in single stage mode, reload value from arg2. WDT is fed automatically when stage 0 expires and generates an interrupt. WDT is configured in 2-stage mode, reload value from arg1. A software timer is setup to auto-feed the WDT at the interval passed as arg1 (in microseconds). WDT is configured in single stage mode, with reload value from arg2 (a choice of 3 intervals). Void ets_wdt_enable(uint32_t mode, uint32_t arg1, uint32_t arg2) įrom disassembling the functions, we learn that ETS allows 4 different modes for watchdog (the mode argument to ets_wdt_enable()): Here they are, with reconstructed prototypes: void ets_wdt_init(void) The linker script shows a number of ets_wdt_* functions provided by ROM. This article describes the process and the results. While working on Mongoose OS ESP8266 port, we reverse-engineered most of the module's functionality and ROM functions. As many parts of ESP8266, it is undocumented. ESP8266 contains a hardware watchdog timer (WDT) module.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |