File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52 Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,11 @@ watchdog_status_t hal_watchdog_init(const watchdog_config_t *config)
27
27
{
28
28
nrfx_err_t err_code ;
29
29
30
- // nRF would allow a 4294967295 ms refresh value but
31
- // Mbed OS allows max UINT32_MAX ms rehfreses.
32
- if ( config -> timeout_ms < 15U && config -> timeout_ms > 65535U ) {
30
+ // The nRF watchdogs accept a range from 0xF to maximum 0xFFFF_FFFF
31
+ // 32768 Hz ticks. (Plase, see
32
+ // https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fstructnrfx__wdt__config__t.html)
33
+ // Min timeout values in ms range from 0x1 to (0xFFFFFFFF / 0x8000) * 1000
34
+ if ( config -> timeout_ms < 0x1 && config -> timeout_ms > 0x07CFFFFF ) {
33
35
return WATCHDOG_STATUS_INVALID_ARGUMENT ;
34
36
}
35
37
@@ -72,7 +74,8 @@ uint32_t hal_watchdog_get_reload_value(void)
72
74
watchdog_features_t hal_watchdog_get_platform_features (void )
73
75
{
74
76
watchdog_features_t features ;
75
- features .max_timeout = 0xFFFF ;
77
+
78
+ features .max_timeout = 0x07CFFFFF ;
76
79
features .update_config = false;
77
80
features .disable_watchdog = false;
78
81
return features ;
You can’t perform that action at this time.
0 commit comments