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
  • Hi Mars, 

    I have reproduced the issue here on SDK v16. I found that if I compile the example in Debug mode in SES it worked fine, but if I put any optimization level in (in Project Option-> Code generation -> Optimization level)  the issue will happen. This explain why you see the issue when you compile in Release mode. 

    I will check this internally and let you know when we find the root cause. But for now you can continue the development in SES but switch optimization level off. This will result in larger flash size but for development I think it's fine. 

Reply
  • Hi Mars, 

    I have reproduced the issue here on SDK v16. I found that if I compile the example in Debug mode in SES it worked fine, but if I put any optimization level in (in Project Option-> Code generation -> Optimization level)  the issue will happen. This explain why you see the issue when you compile in Release mode. 

    I will check this internally and let you know when we find the root cause. But for now you can continue the development in SES but switch optimization level off. This will result in larger flash size but for development I think it's fine. 

Children
Related