Use 64M Flash to make FAT32 FS, open Writeback mode(NRF_BLOCK_DEV_QSPI_FLAG_CACHE_WRITEBACK), write 1M file "1.txt", "2.txt" in order, use Windows PC to check the prompt "1.txt" damaged.
Environment:SDK15 usbd_msc project
Use 64M Flash to make FAT32 FS, open Writeback mode(NRF_BLOCK_DEV_QSPI_FLAG_CACHE_WRITEBACK), write 1M file "1.txt", "2.txt" in order, use Windows PC to check the prompt "1.txt" damaged.
Environment:SDK15 usbd_msc project
Hi,
Did you have USB connected when writing?
Here is the documentation for the example: USB MSC Example
It states this:
This example allows you to manipulate the file system (on QSPI memory) only while USB is not connected. If USB is connected, access to the file system from a user application is not possible because MSC is not designed to allow access to the file system from multiple sources.
Best regards,
Håkon
Hi,
USB is disconnected.
This issue is happened in the above operation.
Which version of the nRF52840-DK do you have? Note that In SDK v15, workarounds for engineering A were removed, so it will not work as intended.
Hi,
Thank you for your replay.
It has nothing to do with the nrf52840-dk version. I was connected to another 64M Flash chip and changed the IO port.
I have checked and checked the various situations. It is indeed a problem with the FAT file system.
[00:00:00.041,076] <info> app: Creating filesystem... clst 32736 sector 63, count 1 addr 3000 sector 69, count 1 addr B000 sector 70, count 1 sector 64, count 1 sector 95, count 2 addr 8000 addr 8200 addr 8400 ........ addr 2B400 addr 2B600 addr 2B800 addr 2BA00 addr 2BC00 addr 2BE00 sector 0, count 1 addr 30000 [00:00:00.041,076] <info> app: Mounting volume... [00:00:00.041,076] <info> app: Done Creating random file: 000c.txt ... sector 351, count 1 addr 4000 sector 353, count 2 addr 2B000 addr 2B200 addr 2B400 addr 2B600 ....... addr 8800 addr 8A00 addr 8C00 addr 8E00 done
This is part of my debugging information, "addr 3000" and "addr 4000" is caused by this problem, the next file will start with "addr c000", the file size is 1M Byte