User Tools

Site Tools


en-us_commands:debug_watchdog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en-us_commands:debug_watchdog [2026/09/07 21:52] – 만듦 - 바깥 편집 127.0.0.1en-us_commands:debug_watchdog [2026/09/12 23:27] (current) – 바깥 편집 127.0.0.1
Line 1: Line 1:
 ====== Debug and Watchdog ====== ====== Debug and Watchdog ======
  
-^ Command ^ Description ^ +Inspect execution state or configure the Watchdog.
-| ''debugStart()'', ''debugStart(baud)'', ''debugStart(serial, baud)'' | Starts debug output and the port. | +
-| ''debug()'', ''debugln()'' | Outputs values only when debugging is enabled. | +
-| ''debugStop()'', ''debugState()'' | Stops output or checks the state. | +
-| ''WDT_ENABLE(time)'' | Sets the Watchdog timeout and enables it. | +
-| ''WDT()'' | Refreshes the Watchdog before its timeout expires. | +
-| ''WDT_DISABLE()'' | Disables the Watchdog. |+
  
-<code cpp> +===== Debug =====
-void setup() { +
-  debugStart(115200); +
-  WDT_ENABLE(WDT_2S); +
-+
-void loop() { +
-  debugln("running"); +
-  WDT(); +
-+
-</code>+
  
-===== Command Prototypes =====+  * [[:en-us_commands:reference:debugstart|debugStart()]] — Sets the port and baud rate for debug output. 
 +  * [[:en-us_commands:reference:debugstop|debugStop()]] — Stops debug output. 
 +  * [[:en-us_commands:reference:debugstate|debugState()]] — Returns whether debug output is enabled. 
 +  * [[:en-us_commands:reference:debug|debug()]] — Outputs values only when debugging is enabled. 
 +  * [[:en-us_commands:reference:debugln|debugln()]] — Outputs a debug value followed by a newline.
  
-^ Return Type ^ Command Prototype ^ +===== Watchdog =====
-| ''void'' | ''debugStart()''+
-| ''void'' | ''debugStart(unsigned long baudrate)''+
-| ''void'' | ''debugStart(HardwareSerial& serialPort)''+
-| ''void'' | ''debugStart(HardwareSerial& serialPort, unsigned long baudrate, uint8_t config SERIAL_8N1)''+
-| ''void'' | ''debugStop()''+
-| ''bool'' | ''debugState()''+
-| ''void'' | ''debug(const __FlashStringHelper* value)''+
-| ''void'' | ''debug(const String& value)''+
-| ''void'' | ''debug(const char value[])''+
-| ''void'' | ''debug(char value)''+
-| ''void'' | ''debug(unsigned char value, int base DEC)''+
-| ''void'' | ''debug(int value, int base DEC)''+
-| ''void'' | ''debug(unsigned int value, int base DEC)''+
-| ''void'' | ''debug(long value, int base DEC)''+
-| ''void'' | ''debug(unsigned long value, int base DEC)''+
-| ''void'' | ''debug(double value, int digits 2)''+
-| ''void'' | ''debugln()''+
-| ''void'' | ''debugln(const __FlashStringHelper* value)''+
-| ''void'' | ''debugln(const String& value)''+
-| ''void'' | ''debugln(const char value[])''+
-| ''void'' | ''debugln(char value)''+
-| ''void'' | ''debugln(unsigned char value, int base DEC)''+
-| ''void'' | ''debugln(int value, int base DEC)''+
-| ''void'' | ''debugln(unsigned int value, int base DEC)''+
-| ''void'' | ''debugln(long value, int base = DEC)''+
-| ''void'' | ''debugln(unsigned long value, int base = DEC)''+
-| ''void'' | ''debugln(double value, int digits = 2)''+
-| ''void'' | ''WDT_ENABLE(uint8_t ms)''+
-| ''void'' | ''WDT_DISABLE()''+
-| ''void'' | ''WDT()'' |+
  
-Watchdog time constants differ by CPU. Select a timeout comfortably longer than the worst-case communication wait and loop execution time.+  * [[:en-us_commands:reference:wdt_enable|WDT_ENABLE()]] — Sets the Watchdog timeout and starts it. 
 +  * [[:en-us_commands:reference:wdt_disable|WDT_DISABLE()]] — Stops the Watchdog. 
 +  * [[:en-us_commands:reference:wdt|WDT()]] — Refreshes the Watchdog before its timeout expires.
  
-[[:en-us_commands:builtin|← Built-in Command List]]+[[:en-us_commands:builtin|← Built-in function list]]
  
en-us_commands/debug_watchdog.1788785565.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki