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
Revision:
1:ebb9ac70fa32
Parent:
0:1ee47a3d42c5
--- a/main.cpp	Tue Oct 15 09:56:45 2013 +0000
+++ b/main.cpp	Wed Oct 16 07:45:13 2013 +0000
@@ -1,9 +1,14 @@
 #include "mbed.h"
 
+extern "C" void NMI_Handler() {
+    DigitalIn bla(PTA4);
+}
+
 DigitalOut rled(LED_RED);
 DigitalOut bled(LED_BLUE);
 DigitalOut gled(LED_GREEN);
-InterruptIn test(PTA4);
+
+
 
 void falling()
 {
@@ -24,6 +29,7 @@
 
 int main()
 {
+    InterruptIn test(PTA4);
     test.fall(falling);
     test.rise(rising);
     while(1) {