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
and the disk does not open in Windows, it gives an error window when connecting nrf USB.
Thank you.
4034.chatDK_update.7z
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
Hi,
Could you please show the error that you get?
Best regards,
Dejan
windows error looks the same as in devzone.nordicsemi.com/.../nrf52833dk_nrf52833-usb-mass-storage-issue
Hi,
As you based your project on the mass sample, you could start adding the changes one-by-one to the mass sample in order to find which one of the introduced changes breaks the storage.
Best regards,
Dejan
I use CHAT + MASS when I add I come to the example that I posted here for you
Hi,
Sergnrf said:I use CHAT + MASS when I add I come to the example that I posted here for you
Thank you for providing this information.
You could start with mass sample and then add the functionalities that you need to it. In this way, you could narrow down the problem to a specific change which introduces the problem.
Best regards,
Dejan
Hi,
CONFIG_APP_MSC_STORAGE_FLASH_FATFS is Kconfig option in the scope of zephyr/samples/subsys/usb/mass sample.
Best regards,
Dejan
Hi,
I have made an internal inquiry. I will get back to you when I get more information.
Best regards,
Dejan
Hi,
I have made an internal inquiry. I will get back to you when I get more information.
Best regards,
Dejan
Hi,
The issue might not be with any of the samples (mass and chat) independently, but with the way how they are used together. We have looked into it, and it might potentially be configuration/devicetree/partition problem.
Could you provide information on how this issue is connected with your other issue?
You could also have a look at this discussion for some further hints.
Did you have any progress related to this issue yourself? Could you provide status update from your side?
Best regards,
Dejan
Hi,
so far nothing has helped.
Best regards,
Serhii
Hi,
This may or may not be related to your issue, but due to some blocking behavior when working with USB, all shell_print statements in model_handler.c should ideally be either removed or replaced by either printk or LOG.
Regarding the persistent USB storage, I have tested successfully with a following configuration changes applied to your project:
prj.conf
CONFIG_NVS=n CONFIG_SETTINGS=n CONFIG_PM_SINGLE_IMAGE=n # CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000 CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=n CONFIG_BT_SETTINGS=n CONFIG_APP_MSC_STORAGE_FLASH_FATFS=y #CONFIG_APP_MSC_STORAGE_RAM=y
storage_partition: partition@0 { label = "storage"; #reg = <0x00000000 DT_SIZE_K(8000)>; reg = <0x00000000 0x00020000>; };
Thank you Dejan, I will be satisfied with this option if I can replace shell_print to some kind of uart_tx?
To give out an msg array to the uart.
In version with FOTA and CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
when I add to prj.conf your changes
when I set CONFIG_NVS=n I have error
C:\ncs\v2.3.0\nrf\include\flash_map_pm.h:41:22: error: 'PM_storage_partition_ID' undeclared (first use in this function) 41 | #define PM_ID(label) PM_##label##_ID | ^~~ C:\ncs\v2.3.0\nrf\include\flash_map_pm.h:46:35: note: in expansion of macro 'PM_ID' 46 | #define FIXED_PARTITION_ID(label) PM_ID(label) | ^~~~~ c:\da\ncs\chat\src\mass.c:23:41: note: in expansion of macro 'FIXED_PARTITION_ID' 23 | #define STORAGE_PARTITION_ID FIXED_PARTITION_ID(STORAGE_PARTITION) | ^~~~~~~~~~~~~~~~~~ c:\da\ncs\chat\src\mass.c:34:36: note: in expansion of macro 'STORAGE_PARTITION_ID' 34 | mnt->storage_dev = (void *)STORAGE_PARTITION_ID; | ^~~~~~~~~~~~~~~~~~~~ C:\ncs\v2.3.0\nrf\include\flash_map_pm.h:41:22: note: each undeclared identifier is reported only once for each function it appears in 41 | #define PM_ID(label) PM_##label##_ID | ^~~ C:\ncs\v2.3.0\nrf\include\flash_map_pm.h:46:35: note: in expansion of macro 'PM_ID' 46 | #define FIXED_PARTITION_ID(label) PM_ID(label) | ^~~~~ c:\da\ncs\chat\src\mass.c:23:41: note: in expansion of macro 'FIXED_PARTITION_ID' 23 | #define STORAGE_PARTITION_ID FIXED_PARTITION_ID(STORAGE_PARTITION) | ^~~~~~~~~~~~~~~~~~ c:\da\ncs\chat\src\mass.c:34:36: note: in expansion of macro 'STORAGE_PARTITION_ID' 34 | mnt->storage_dev = (void *)STORAGE_PARTITION_ID;