flashdisk_init_runtime: Error -22 while getting page info, usb_msc: mass_storage_init: Storage init ERROR !!!! - Aborting USB init

Hi Team,
NCS v2.3.0
nrf52840

MASS example works.

I am trying to add support mass storage to example CHAT.
I copied the settings prj.conf,Kconfig.

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

I try executed nrfjprog --qspieraseall, but it did not solve the problem.

What's the matter? How to fix?


Thank you in advance.


  • /delete-node/ &storage_partition;
    
    &mx25l256 {
    	partitions {
    		compatible = "fixed-partitions";
    		#address-cells = <1>;
    		#size-cells = <1>;
    
    		storage_partition: partition@0 {
    			label = "storage";
    			reg = <0x00000000 DT_SIZE_K(32000)>;
    		};
    	};
    };
    
    / {
    	msc_disk0 {
    		compatible = "zephyr,flash-disk";
    		partition = <&storage_partition>;
    		disk-name = "NAND";
    		cache-size = <4096>;
    	};
    };

    DT_SIZE_K(32000) I change to 0x00020000 and the error goes away but the disk doesn't work at all.

    I set CONFIG_APP_MSC_STORAGE_RAM=y the disk appears but windows says disk cannot be formatted.
    3857.chat.zip
  • Since the mass sample is provided by Zephyr, you can ask Zephyr Discord. Maybe the feature is not supported. 

    -Amanda H. 

  • MASS example works, how to combine it with the CHAT example so that it works? 
    CHAT example this is the development of Nordic.

  • Hi, 

    Sergnrf said:
    MASS example works

    I only see the MASS shown as a portable device and cannot be formatted. Could you provide your worked MASS example for the test?

    Is it possible also to provide your CHAT example combined with the MASS example?

    -Amanda H.

  • Related