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

nrf52840 usb_msc demo fatfs error

Hi,

I use usb_msc in nRF5_SDK_15.3.0_59ac345 use case, format file system and create folder and its subfolder test, found that segger development environment compiled programs, format file system, create subfolders appear garbled;

Using the program compiled by KEIL development environment, after formatting the file system, it is normal to create subfolders;

At present, the project development is close to the end, we hope to continue to use Segger to complete the development work; Segger version v4.12, v4.30, v4.53 are all in disorder; see the appendix for the test program; development board pca10056;

1. Test procedure

2262.nRF5_SDK_15.3.0_59ac345-new.rar

2. Problem phenomenon

 1) First level folder:

 2) Secondary folder created by keil program normally

 3) Secondary folder created by segger program error

3. Test method

  1) Burning the program compiled by Keil

     1> Unplug USB and press button3 to format the file system

     2> Press button1 to create folders and subfolders

     3> Plug in USB to check whether the subfolder is normal

    4> This is the. Hex compiled by me with keil. It is convenient for you to reproduce the problem quickly

         

  2) Burning the program compiled by Segger

      Note: after burning, power off the j-link, USB and development board once, and then carry out the following steps;

     1> Unplug USB and press button3 to format the file system

     2> Press button1 to create folders and subfolders

     3> Plug in USB to check whether the subfolder is error

4> This is the. Hex compiled by me with segger. It is convenient for you to reproduce the problem quickly

    5700.usbd_msc_pca10056.hex

Parents Reply
  • Hi Marx, 

    We will continue to discuss about the garbage folders in this thread. 
    We haven't found a clean fix for this issue yet, however what we found is: 

    - If we use Windows to format the disk prior to writing the folders into it seems to fix the issue. 

    - A workaround, kind of dirty fix is to create a first dummy folder (maybe call it System_data for example)  and change the attribute of it to hidden (f_chmod(folder name ,AM_HID,AM_HID); ) Then the rest would work fine. Of course if the user choose to show hidden file then the folder will be visible but it's not always the case. Usually we have a hidden folder called "System Volume Information" in any hard drive as well. 

Children
Related