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

nrf52840 usb_msc demo windos10 Home Edition USB disk will be lost in about 20 minutes

I used usb_msc with nRF5SDK160098a08e2 sdk to connect the usb of pca10056 development board to win10 home version and the disk could not be recognized after about 20 minutes;

1. Current test conclusion:

 1) Appears only in win10 home edition, not in win10 professional edition;
 2) Use the Debug mode, the optimization level is set to None, the disk is displayed for 20 minutes after mounting, and the disk is not lost. When entering the secondary folder to write the file, the file cannot be written, and finally the disk is lost;


2. Test procedures

nRF5SDK160098a08e2-new-2.rar

3. Problem phenomenon
1) When the USB is connected to the computer


2) The disk is lost in about 20 minutes


4. Test method
1) Burn the compiled program
2) USB connection to win10 home version computer
2) Create TEST1/TEST2/test.txt

   
3) Write the current time in the test.txt file every 10 minutes;
4) After a few times you will find that the file cannot be written;
5) The disk has been lost;



5. The compiled hex file is convenient for you to quickly reproduce the problem;

 2425.usbd_msc_pca10056.hex

Parents
  • Can it be that the  USB port power is turned off after a while? There shouldn't be any difference in how Windows handles a USB drive across Windows versions. Check in Device Manager: 

  • 1. Test conclusion

    1) I turn off the power saving option of USB hub power tube of win10 home version, and the test will still appear;

    2. Other information:

    1) The windows 10 home version is connected to the MCU of other four manufacturers without disk loss;

    2) It can be determined that there is a difference between win10 home edition and win10 professional edition. Previously, we used MCU from other manufacturers to encounter disk loss in win10 home edition, which was finally solved by upgrading SDK;

    3. Personal suggestions:

    1) You find a win10 home computer, which is very easy to reproduce;

  • Hello,

    Can you please try the following guide to turn off the power saving mode? It is a bit more steps than only the device manager:

    https://www.hamoperator.com/Fusion/FusionFiles/K9EQ-Fusion-PDF-0023.pdf

    If that doesn't work. Can you please check if the log says anything when you try to open the folder, and the disk disconnects?

    BR,

    Edvin

  • Hi Edvin,

    1. I have turned off two USB power management according to the tutorial you provided, and the phenomenon still appears after testing;

    2. The latest test conclusion:
    1). Win10 Home Edition has disk loss on 1903 and 1803 versions;

    2). The system version number where the disk is missing
    1> Version number: 1903, operating system version: 18362.836
    2> Version number: 1803, operating system version: 17134.765

    3). The system version number without disk loss
    1> Version number: 1809, operating system version: 17763.1282
    1> Version number: 1809, operating system version: 17763.1217

    3. Test process description
    1) Test equipment: 6 win10 home computers;
    2) 3 sets have disk loss, 2 sets have version number 1903, 1 set has 1803;
    3) 3 sets have no disk loss, 2 sets have version number 1809, 1 set has 1909;

    4. The problem of disk loss, we have passed detailed tests, the phenomenon has been very clear
    Must appear on version 1903 and 1803 systems, I hope you can understand the true status of the problem,
    Now that the small batch of products has been completed, we will take the next step according to your problem analysis;

Reply
  • Hi Edvin,

    1. I have turned off two USB power management according to the tutorial you provided, and the phenomenon still appears after testing;

    2. The latest test conclusion:
    1). Win10 Home Edition has disk loss on 1903 and 1803 versions;

    2). The system version number where the disk is missing
    1> Version number: 1903, operating system version: 18362.836
    2> Version number: 1803, operating system version: 17134.765

    3). The system version number without disk loss
    1> Version number: 1809, operating system version: 17763.1282
    1> Version number: 1809, operating system version: 17763.1217

    3. Test process description
    1) Test equipment: 6 win10 home computers;
    2) 3 sets have disk loss, 2 sets have version number 1903, 1 set has 1803;
    3) 3 sets have no disk loss, 2 sets have version number 1809, 1 set has 1909;

    4. The problem of disk loss, we have passed detailed tests, the phenomenon has been very clear
    Must appear on version 1903 and 1803 systems, I hope you can understand the true status of the problem,
    Now that the small batch of products has been completed, we will take the next step according to your problem analysis;

Children
  • Hello,

    The issue is that we don't have any win10 home edition computers to test with. 

    I understand that this is an issue.

    Can you please check the log messages from the nRF device at the point when it disconnects? Does it say anything? Do you receive any events at all?

  • Hi Edvin:

    1. Log log test conclusion:
        1) The log information of USB disk loss is not recorded in the simulation state;

    2. The original log information is as follows:


    [00:00:00.000,000] <info> app: app started ....
    [00:00:00.000,000] <info> app_timer: RTC: initialized.
    [00:00:00.000,000] <info> app: Initializing disk 0 (QSPI)...
    [00:00:00.000,000] <error> app: Disk initialization failed.... == 0
    [00:00:00.000,000] <info> app: Mounting volume...
    [00:00:00.000,000] <info> app:
    Listing directory: /
    <DIR> TEST1
    <DIR> System Volume Information
    Entries count: 3
    Creating random file: 000041c6.txt ...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> app: USB ready

    3. Repeat the phenomenon of disk loss:
        1) After the program runs for 20 minutes, it is normal to refresh the disk and open the 4511.txt file in the disk;
        2) When writing data to the disk, the display cannot be saved, and finally it shows that it cannot respond;
       
       3) The disk is being refreshed at this moment, the disk has been lost;

        

    4. Personal advice:
        1) The efforts I can make on this side may not be able to advance anymore, I hope the original factory can actively cooperate and give help;

  • Hello,

    I still haven't been able to reproduce the issue. I tried at home today, but my computer has Windows 10 Home Edition 1909, and as you claim, the issue is not present there. I have forwarded the question to our usb driver team. They also don't have a home edition license in the office, but they will look into it. I will let you know when I hear anything. Hopefully next week.

    Best regards,

    Edvin

  • Hi Edvin,

      We have already started preparations for alternatives, I hope you can characterize the problem as soon as possible, thank you!

  • Hello,

    This is the response I received from the USB driver team:

    ---------------------------

    Considering that this issue is only reproducible on two versions of Windows Home, it will not be trivial to set the environment up.

    But we could start from trying to debug it on clients’ setup – could you ask him to enable logging (specifically ones in USB MSC class), preferably using RTT as the amount could be overwhelming. It is possible that Windows sends an MSC command that is unsupported, which would result in this log:

    NRF_LOG_DEBUG("CMD: UNSUPPORTED");

    Even better if they could print the value of p_msc_ctx->cbw.cdb[0] in that log.

    If the client has a USB analyzer, bus activity logs would be greatly appreciated too.

    ---------------------------

    Can you please try to enable the logging on the USB MSC class?

    Do you have access to a USB analyzer? If so, can you please try to capture a USB trace?

    Best regards,

    Edvin

Related