11 years, 8 months ago.

time(0) disparity

Dear mbed users,

I have an issue I can't quite put my finger on. Most of my mbeds return time elapsed in seconds since cold reboot (USB removal) but 2 of the mbeds always show an overflow (4294967295), reboot or not. This is using the exact same code, so I'm confused as to what is causing this.

Anyone familiar with this?

Thanks

2 Answers

11 years, 8 months ago.

I don't think even with a power cycle the RTC time is guaranteed to be zero at start, so you have to set the time at zero at the start of your program. (set_time(0)).

Accepted Answer
11 years, 8 months ago.

Alright, had a feeling it might be something like that, I guess the 2 specific mbeds showing this behaviour are just undefined then.

Thanks :)