Reproduce K64F lpticker failure using a pending overflow interrupt

Files at this revision

API Documentation at this revision

Comitter:
c1728p9
Date:
Sat Jun 03 01:28:31 2017 +0000
Commit message:
Initial commit

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r ec50e23dc211 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jun 03 01:28:31 2017 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+// For debugging only
+extern "C" {
+#include "fsl_rtc.h"
+}
+
+DigitalOut led1(LED1);
+
+int main() {
+    led1 = 1;
+
+    // For debugging only
+    CLOCK_EnableClock(kCLOCK_Rtc0);
+    printf("Enabled interrupts: 0x%x\r\n", RTC->IER);
+    printf("Pending interrupts: 0x%x\r\n", RTC->SR & 0x7);
+
+    set_time(0xFFFFFFFE);
+
+    while (true) {
+        led1 = !led1;
+        wait(1.0);
+    }
+}
+
diff -r 000000000000 -r ec50e23dc211 mbed-os.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Sat Jun 03 01:28:31 2017 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#5fff7e1daeb395aa3d1ecf3f9ec3f4fead3de0c2