Tedd OKANO
/
M0_restert_by_file_open_close_repeat
sample of problem: M0 restarted by file-open-close repeat 146 times
main.cpp
- Committer:
- okano
- Date:
- 2012-04-17
- Revision:
- 0:499e5f2fe4b3
- Child:
- 1:15bd9459aa18
File content as of revision 0:499e5f2fe4b3:
#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++; } }