Javier,
I just had another thought. It might be worthwhile to make sure there’s nothing wrong with the RTC on that mDot. Can you test on another mDot? Here’s the main for a simple app that will make sure the RTC is functioning properly.
#include "mbed.h"
int main() {
printf("initializing RTC\r\n");
// 1/3/2016 00:00:00 GMT - 1451779200
set_time(1451779200);
while (true) {
printf("time %d\r\n", time(NULL));
wait(1);
}
return 0;
}
Cheers,
Mike