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

Dependencies:   mbed

main.cpp

Committer:
okano
Date:
2012-04-17
Revision:
1:15bd9459aa18
Parent:
0:499e5f2fe4b3

File content as of revision 1:15bd9459aa18:

#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/TEST.csv", "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++;
    }
}