Current (on Nov. 15th, 2014) LPC1114 Ticker function has a trouble after one hour and 11 minutes after due to 32bit timer overflow. I hope this will be fine by mbed support team.
Please refer following Note.
http://developer.mbed.org/users/kenjiArai/notebook/lpc1114fn28---suggestion-for-improvement/#
Diff: main.cpp
- Revision:
- 0:d54a5362ac2a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Nov 15 08:00:10 2014 +0000 @@ -0,0 +1,28 @@ +/* + * mbed Application program / Ticker has a bug!? + * by Kenji Arai / JH1PJL + * http://mbed.org/users/kenjiArai/ + * Created: Nobember 15th, 2014 + */ +#include "mbed.h" + +Ticker t; + +uint32_t t_count; +uint8_t flag; + +void cyclic(void){ flag = 1;} + +int main(void){ // PLease wait 1 hour 11 minutes and 34.9 seconds + t.attach(&cyclic, 1.0); + flag = 0; + t_count = 0; + while(true) { + while(flag == 0){ + wait(0.1); + printf("."); + } + flag = 0; + printf("\r\nt_count=%8d, TMR32B1=%14d\r\n", ++t_count, LPC_TMR32B1->TC); + } +}