Skip to content

watchdog_enable() confuses milliseconds and microseconds #1238

Closed
@awabom

Description

@awabom

In the file:

https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/hardware_watchdog/include/hardware/watchdog.h

delay_ms is described as:

"delay_ms Number of milliseconds before watchdog will reboot without watchdog_update being called. Maximum of 0x7fffff, which is approximately 8.3 seconds"

But 0x7fffff is 8388607 which is 8.3 seconds only if the unit is microseconds. The text also mentions "then the delay_ms parameter will not be in microseconds".

So I guess it is microseconds? Then I also think the parameter should be named delay_us, not delay_ms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions