NCS mass littlefs

Hi,

I am trying to run the mass sample of NCS V2.6.0 (zephyr\samples\subsys\usb\mass).

I followed the README.rst,

- build  the sample with -DCONFIG_APP_MSC_STORAGE_FLASH_LITTLEFS=y,

- download it to the nrf52840DK, (the log looks OK )

\0*** Booting nRF Connect SDK v3.5.99-ncs1 ***
[00:00:00.253,265] <inf> flashdisk: Initialize device NAND
[00:00:00.253,265] <inf> flashdisk: offset 0, sector size 512, page size 4096, volume size 8192000
Area 0 at 0x0 on mx25r6435f@0 for 8192000 bytes
[00:00:00.257,537] <inf> littlefs: LittleFS version 2.5, disk version 2.0
[00:00:00.259,552] <inf> littlefs: FS at mx25r6435f@0:0x0 is 2000 0x1000-byte blocks with 512 cycle
[00:00:00.259,582] <inf> littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
Mount /lfs: 0
/lfs: bsize = 16 ; frsize = 4096 ; blocks = 2000 ; bfree = 1998
/lfs opendir: 0
End of files
[00:00:00.311,401] <inf> main: The device is put in USB mass storage mode.


- connect the USB to the WIN10, and the WIN10 requests a format operation, after formatting, the mass storage works

The problem is that after the power-on reset, and connecting the USB to the WIN10 again, the WIN10 still requests a format operation.

if power-on reset with USB is connected, the log as below 

\0*** Booting nRF Connect SDK v3.5.99-ncs1 ***
[00:00:00.253,295] <inf> flashdisk: Initialize device NAND
[00:00:00.253,295] <inf> flashdisk: offset 0, sector size 512, page size 4096, volume size 8192000
Area 0 at 0x0 on mx25r6435f@0 for 8192000 bytes
[00:00:00.257,598] <inf> littlefs: LittleFS version 2.5, disk version 2.0
[00:00:00.259,582] <inf> littlefs: FS at mx25r6435f@0:0x0 is 2000 0x1000-byte blocks with 512 cycle
[00:00:00.259,613] <inf> littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:00.275,695] <err> littlefs: WEST_TOPDIR/modules/fs/littlefs/lfs.c:1234: Corrupted dir pair at {0x0, 0x1}
[00:00:00.275,726] <wrn> littlefs: can't mount (LFS -84); formatting
[00:00:00.356,445] <inf> littlefs: /lfs mounted
Mount /lfs: 0
/lfs: bsize = 16 ; frsize = 4096 ; blocks = 2000 ; bfree = 1998
/lfs opendir: 0
End of files
[00:00:00.407,989] <inf> main: The device is put in USB mass storage mode.

[00:00:00.718,933] <err> usb_device: Request buffer too small

Related