summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--cc3200/mods/pybrtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cc3200/mods/pybrtc.c b/cc3200/mods/pybrtc.c
index 603f9930c8..7a40deb857 100644
--- a/cc3200/mods/pybrtc.c
+++ b/cc3200/mods/pybrtc.c
@@ -192,7 +192,7 @@ STATIC mp_obj_t pyb_rtc_callback (mp_uint_t n_args, const mp_obj_t *pos_args, mp
// check if any parameters were passed
mp_obj_t _callback = mpcallback_find((mp_obj_t)&pyb_rtc_obj);
if (kw_args->used > 0 || !_callback) {
- uint32_t f_mseconds = args[3].u_int;
+ uint32_t f_mseconds = MAX(1, args[3].u_int);
uint32_t seconds;
uint16_t mseconds;
// get the seconds and the milliseconds from the RTC