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/#
main.cpp
- Committer:
- kenjiArai
- Date:
- 2014-11-15
- Revision:
- 0:d54a5362ac2a
File content as of revision 0:d54a5362ac2a:
/* * 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); } }