sample of problem: M0 restarted by file-open-close repeat 146 times

Dependencies:   mbed

Revision:
0:499e5f2fe4b3
Child:
1:15bd9459aa18
diff -r 000000000000 -r 499e5f2fe4b3 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 17 06:02:49 2012 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+LocalFileSystem SeqFile("Local");
+
+int main() {
+    FILE    *fp;
+    int     i   = 1;
+
+    printf( "\r\nSTART\r\n" );
+    wait( 0.1 );
+
+    while ( 1 ) {
+        fp = fopen( "/Local/a.a", "r" );
+        if (!fp) {
+            printf( "error %d\r\n", i );
+            exit( 1 );
+        } else {
+            printf( "%d (%p)\r\n", i, fp );
+            fclose( fp );
+        }
+        wait( 0.1 );
+        i++;
+    }
+}