Problems writing to two files on an SD card simultaneously

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Problems writing to two files on an SD card simultaneously

跳至解决方案
607 次查看
ARQuattr
Contributor IV

We are testing writing to an SD card using the TWR-K60F120M board, running MQX4.1, with the HVAC demo and SD driver and MFS library included.  We can open a file and read from it, then open two more files in write mode, but it will only work with the first file that is written to.  Upon trying to write to the second file the task is blocked.  This is the same whether I use fprintf(), or write().  The file handles are not NULL, and it doesn't block when the files are open, only when written to some time later.  I doubled the stack size (to 10kB) and it didn't help.

Is there a limitation with accessing multiple files through MQX MFS, or are we doing something wrong?

Thanks

Angelo

标签 (1)
标记 (4)
0 项奖励
回复
1 解答
384 次查看
ARQuattr
Contributor IV

I added Kernel logging in the user_config to monitor the stack usage to confirm I was not running out of stack space, and after recompiling the PSP the file writing issue went away.  I'm pretty sure nothing was changed in the PSP before, but I'm not sure if perhaps the projects (i.e. MFS, PSP, BSP, etc.) were built in the wrong order.

在原帖中查看解决方案

0 项奖励
回复
1 回复
385 次查看
ARQuattr
Contributor IV

I added Kernel logging in the user_config to monitor the stack usage to confirm I was not running out of stack space, and after recompiling the PSP the file writing issue went away.  I'm pretty sure nothing was changed in the PSP before, but I'm not sure if perhaps the projects (i.e. MFS, PSP, BSP, etc.) were built in the wrong order.

0 项奖励
回复