AnsweredAssumed Answered

File writing tasks silently failing on K60 and K64F

Question asked by Sean MacKay on Nov 3, 2014
Latest reply on Mar 31, 2015 by Tobias Maurer

Hello, I've experienced an issue using MFS and a file writing task on

both a K60 custom board, and a K64F FRDM board: When the fopen() or

write() function is called the function will never return and the task will

cease operating. There are no errors thrown and I don't know where to

look to figure out why the function ceased. If I step through line by line

in the debugger eventually the debugger will just stop responding as

well.

 

It happened first with a custom K60 based board, using MFS on the

Internal Flash (to facilitate developing the file logic until a new board with

better storage was developed). When a specialized test task wrote to

Flash it worked, and when ONLY the file writing task (not the webserver,

telnet server, sensor reading, or data uploading tasks) it also worked.

But when all the tasks were running the file writing would silently stop

the task. By lowering the priority of the file writing task to the lowest

priority it began to function properly.

 

Now, on the K64F FRDM board we are attempting to refactor that task

to use the SD card. The internal flash writing still works. We have also

used the SD card example application to verify the SD card writing

works. I moved the SD card initialization into our full project and it

installs and uninstalls the SD card appropriately, but whenever we try to

write to it the task silently fails again.

 

Any idea where or how I could try and Troubleshoot this, or what might

be happening? Because of the task priority and the way it just ceases, I

wondered if there's some sort of deadlock that occurs with the file

writing task and one of the others. Priority doesn't seem to be helping

the SD card case though.

 

We're using CodeWarrior Version: 10.5

     Build Id:130916

Outcomes