Simultaneous SDCard Access Corruption

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Simultaneous SDCard Access Corruption

894件の閲覧回数
leifzars
Contributor IV

The project is set up as follows. USB with MSC access to the SDCard device, along with MFS on top of the SDCard as well.

Now I know that it is potentially unsafe for both USB and MFS to access to the SDCard simultaneously, but in this case USB is only reading, while MFS both reads and writes. So I know of no reason why this is not acceptable.

When the board boots it starts a self test, writing a few hundred K to a file via MFS and then reading it back to validate. The writing appears to go fine, but the reading randomly fails in random ways. MFS reports no issue but the data is invalid. The odd thing is that when I attempt an immediate re read of the data (1 block of 512 bytes) it is valid. Now this only happens when Windows is scanning / reading the SDCard via USB MSC, and I verified that no writes are being issued via MSC. So as soon as a compile out the MSC support or unplug the USB cable the self test works every time with no re reading necessary.

So some portion of the SDCard driver, or sub driver is being corrupted. I am not overly familiar with this driver, so I am asking for some guidance. Anyone have an idea?

Leif

ラベル(2)
タグ(4)
0 件の賞賛
返信
2 返答(返信)

651件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Leif:

Which MQX version you are using?

Not sure what is the root cause now. But if you are using an older version, I would suggest you update to the latest version, MQX 4.2.0 and plus the patch 4.2.0.2. Because this version fixed one important MFS issue.

pastedImage_1.png

Please refer to the release note for more details.

Regards

Daniel

0 件の賞賛
返信

651件の閲覧回数
leifzars
Contributor IV

Yes, I am patched through 4.2.0.2

0 件の賞賛
返信