Skip to content

Watchdog timer overflow error for big timeout #1523

Open
@mrespin

Description

@mrespin

In file hal/architecture/NRF5/drivers/wdt.h line 80:
NRF_WDT->CRV = (32768*timeout)/1000; \
Setting large timeout value generating overflow error.
If changed to
NRF_WDT->CRV = (uint32_t)(32.768*timeout); \
there is no overflow error anymore. Not sure if (uint32_t) cast is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions