Code for bug report; KL25Z not running when PTA4 hasn't been high for > 400ms
- 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, committed 2013-10-16
- Comitter:
- vsluiter
- Date:
- Wed Oct 16 07:45:13 2013 +0000
- Parent:
- 0:1ee47a3d42c5
- Commit message:
- This program is working! Thanks to Erik Olieman for pointing out the missing "extern 'C'"
Changed in this revision
diff -r 1ee47a3d42c5 -r ebb9ac70fa32 main.cpp --- 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) {
diff -r 1ee47a3d42c5 -r ebb9ac70fa32 mbed-src.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-src.lib Wed Oct 16 07:45:13 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-src/#a3c7023e45de
diff -r 1ee47a3d42c5 -r ebb9ac70fa32 mbed.bld --- a/mbed.bld Tue Oct 15 09:56:45 2013 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f \ No newline at end of file