This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK 15.3 USB MSC can not modify file in pc.

Hi.

    I use SDK15.3 (PCA10056 NRF52840) USB MSC example.

    i can enumerate disk, creat file and delete file. but  i can not edit file. 

    When I edited the file, re-plugged the USB and opened the file I just edited again. pc display file does not exist. The content I just edited does not exist.

    

    wait for help.  thank you.

    

  • Thank you for reply.

    I have add this code at the beggining of block_dev_qspi_uninit:

    as a result.  Disk initialization success. the log as follow:

    [00:00:00.000,000] <info> app: Initializing disk 0 (QSPI)...
    [00:00:00.000,000] <info> qspi: Init
    [00:00:00.000,000] <info> app: Mounting volume...
    [00:00:00.000,000] <info> app: 
    Listing directory: /
       <DIR>   SYSTEM~1
            0  000041C6.TXT
            5  123.TXT
    [00:00:00.000,000] <info> app: Entries count: 4
    [00:00:00.000,000] <info> app: Creating random file: 000041c6.txt ...
    [00:00:00.000,000] <info> app: done
    [00:00:00.000,000] <info> app: USBD MSC example started.
    [00:00:00.000,000] <info> app: USB power detected
    [00:00:00.000,000] <info> app: Un-initializing disk 0 (QSPI)...
    [00:00:00.000,000] <info> qspi: IOCtl: Cache flush
    [00:00:00.000,000] <info> qspi: Uninit
    [00:00:00.000,000] <info> app: USB ready
    [00:00:00.000,000] <info> qspi: Init
    [00:00:00.000,000] <info> qspi: IOCtl: Cache flush
    [00:00:00.009,063] <info> qspi: IOCtl: Cache flush
    [00:00:00.009,063] <info> app: USB power removed
    [00:00:00.009,063] <info> qspi: Uninit
    [00:00:00.009,063] <info> qspi: Uninit wait_for_idle
    [00:00:00.009,063] <info> app: Initializing disk 0 (QSPI)...
    [00:00:00.009,063] <info> qspi: Init
    [00:00:00.009,063] <info> app: Mounting volume...
    [00:00:00.009,063] <info> app: USB power detected
    [00:00:00.009,063] <info> app: Un-initializing disk 0 (QSPI)...
    [00:00:00.009,063] <info> qspi: IOCtl: Cache flush
    [00:00:00.009,063] <info> qspi: Uninit
    [00:00:00.009,063] <info> app: USB ready
    [00:00:00.009,063] <info> qspi: Init
    [00:00:00.009,063] <info> qspi: IOCtl: Cache flush
    

    but, When I re-plugged the USB and viewed the edited file, the file could not be viewed on the PC again.

    picture like this:

    wait for reply. thank you.

Related