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.

Dependencies:   mbed

Please refer following Note.
http://developer.mbed.org/users/kenjiArai/notebook/lpc1114fn28---suggestion-for-improvement/#

Files at this revision

API Documentation at this revision

Comitter:
kenjiArai
Date:
Sat Nov 15 08:00:10 2014 +0000
Commit message:
This is a test program for Ticker function. After 1h12m, ticker function does NOT work anymore due to 32bit timer overflow.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r d54a5362ac2a main.cpp
--- /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);
+    }
+}
diff -r 000000000000 -r d54a5362ac2a mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Nov 15 08:00:10 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89
\ No newline at end of file