Skip to content

Commit e6d1892

Browse files
authored
RP2040 and RP2350 have different maximum watchdog delays (#2500)
1 parent a1faacf commit e6d1892

File tree

1 file changed

+9
-2
lines changed
  • src/rp2_common/hardware_watchdog/include/hardware

1 file changed

+9
-2
lines changed

src/rp2_common/hardware_watchdog/include/hardware/watchdog.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,21 @@ void watchdog_update(void);
7474
* \note If \ref watchdog_start_tick value does not give a 1MHz clock to the watchdog system, then the \p delay_ms
7575
* parameter will not be in milliseconds. See the datasheet for more details.
7676
*
77+
* \if rp2040_specific
78+
* On RP2040 the maximum delay is 8388 milliseconds, which is approximately 8.3 seconds (this is due to RP2040-E1).
79+
* \endif
80+
* \if rp2350_specific
81+
* On RP2350 the maximum delay is 16777 milliseconds, which is approximately 16.7 seconds.
82+
* \endif
83+
*
7784
* By default the SDK assumes a 12MHz XOSC and sets the \ref watchdog_start_tick appropriately.
7885
*
7986
* This method sets a marker in the watchdog scratch register 4 that is checked by \ref watchdog_enable_caused_reboot.
8087
* If the device is subsequently reset via a call to watchdog_reboot (including for example by dragging a UF2
8188
* onto the RPI-RP2), then this value will be cleared, and so \ref watchdog_enable_caused_reboot will
8289
* return false.
8390
*
84-
* \param delay_ms Number of milliseconds before watchdog will reboot without watchdog_update being called. Maximum of 8388, which is approximately 8.3 seconds
91+
* \param delay_ms Number of milliseconds before watchdog will reboot without watchdog_update being called
8592
* \param pause_on_debug If the watchdog should be paused when the debugger is stepping through code
8693
*/
8794
void watchdog_enable(uint32_t delay_ms, bool pause_on_debug);
@@ -124,7 +131,7 @@ bool watchdog_enable_caused_reboot(void);
124131
* \brief Returns the number of microseconds before the watchdog will reboot the chip.
125132
* \ingroup hardware_watchdog
126133
*
127-
* \if rp2040_specicifc
134+
* \if rp2040_specific
128135
* On RP2040 this method returns the last value set instead of the remaining time due to a h/w bug.
129136
* \endif
130137
*

0 commit comments

Comments
 (0)