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)
2727{
2828 nrfx_err_t err_code ;
2929
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 ) {
3335 return WATCHDOG_STATUS_INVALID_ARGUMENT ;
3436 }
3537
@@ -72,7 +74,8 @@ uint32_t hal_watchdog_get_reload_value(void)
7274watchdog_features_t hal_watchdog_get_platform_features (void )
7375{
7476 watchdog_features_t features ;
75- features .max_timeout = 0xFFFF ;
77+
78+ features .max_timeout = 0x07CFFFFF ;
7679 features .update_config = false;
7780 features .disable_watchdog = false;
7881 return features ;
You can’t perform that action at this time.
0 commit comments