Code for bug report; KL25Z not running when PTA4 hasn't been high for > 400ms

Dependencies:   mbed-src

  • First revision: error, KL25Z will not boot when PTA4 is low
  • Second revision: solved by adding NMI handler (thanks Erik Olieman). This is a fix when using mbed compiled library
  • Third revision: solved by changing startup file. NMI handler no longer needed. This can now only be used when using mbed-src

Files at this revision

API Documentation at this revision

Comitter:
vsluiter
Date:
Tue Oct 15 09:56:45 2013 +0000
Child:
1:ebb9ac70fa32
Commit message:
mbed will only run after PTA4 has been high for > +/-400ms

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 15 09:56:45 2013 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+
+DigitalOut rled(LED_RED);
+DigitalOut bled(LED_BLUE);
+DigitalOut gled(LED_GREEN);
+InterruptIn test(PTA4);
+
+void falling()
+{
+    if(bled)
+        bled =0;
+    else
+        bled = 1;
+}
+
+
+void rising()
+{
+    if(gled)
+        gled =0;
+    else
+        gled = 1;
+}
+
+int main()
+{
+    test.fall(falling);
+    test.rise(rising);
+    while(1) {
+        rled = 1;
+        wait(0.2);
+        rled = 0;
+        wait(0.2);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Oct 15 09:56:45 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file