CONFIG_APP_MSC_STORAGE_RAM VS FLASH_FATFS

Hi Team,
NCS v2.3.0
nrf52840

my project works as expected with CONFIG_APP_MSC_STORAGE_RAM=y

but I need storage FLASH_FATFS

I set CONFIG_APP_MSC_STORAGE_FLASH_FATFS=y
and the disk does not open in Windows, it gives an error window when connecting nrf USB.

Thank you.

4034.chatDK_update.7z
  • Hi,

    Could you please show the error that you get?

    Best regards,
    Dejan

  • 00> *** Booting Zephyr OS build v3.2.99-ncs2 ***
    00> [00:00:00.002,227] <inf> flashdisk: flashdisk_init_runtime: Initialize device NAND
    00> [00:00:00.002,258] <inf> flashdisk: flashdisk_init_runtime: offset 0, sector size 512, page size 4096, volume size 8192000
    00> [00:00:00.002,777] <err> flashdisk: flashdisk_init_runtime: Error -22 while getting page info
    00> [00:00:00.002,777] <err> usb_msc: mass_storage_init: Storage init ERROR !!!! - Aborting USB init
    00> Area 1 at 0xf8000 on flash-controller@4001e000 for 32768 bytes
    00> [00:00:00.002,899] <inf> flashdisk: flashdisk_init_runtime: Initialize device NAND
    00> [00:00:00.002,929] <inf> flashdisk: flashdisk_init_runtime: offset 0, sector size 512, page size 4096, volume size 8192000
    00> [00:00:00.003,448] <err> flashdisk: flashdisk_init_runtime: Error -22 while getting page info
    00> [00:00:00.003,479] <err> fs: fs_mount: fs mount error (-5)
    00> [00:00:00.003,479] <err> main: setup_disk: Failed to moun
    00>
    00>

  • Hi,

    Have you tried using the sample 275880_mass_v2.2.0.zip provided here? I have tested it and it is working in NCS v2.2.0.

    Please find below the log from my nRF52840-DK. 

    *** Booting Zephyr OS build v3.2.99-ncs1 ***
    Area 0 at 0x46000 on flash-controller@4001e000 for 237568 bytes
    [00:00:00.255,706] <inf> flashdisk: Initialize device NAND
    [00:00:00.255,737] <inf> flashdisk: offset 46000, sector size 512, page size 4096, volume size 237568
    [00:00:00.261,444] <inf> flashdisk: Initialize device NAND
    [00:00:00.261,474] <inf> flashdisk: offset 46000, sector size 512, page size 4096, volume size 237568
    Mount /NAND:: 0
    /NAND:: bsize = 512 ; frsize = 512 ; blocks = 424 ; bfree = 420
    /NAND: opendir: 0
      D 0 SYSTEM~1
      F 5 MY_TEXT.TXT
    End of files
    [00:00:00.325,805] <inf> main: The device is put in USB mass storage mode.
    


    Best regards,
    Dejan

  • I use NCS v2.3.0, Mass example works, but I need this functionality to work in the Сhat example, I added the archive with the project, look at the errors it gives, this is an urgent problem, thanks.

Related