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

    Could you please show the error that you get?

    Best regards,
    Dejan

  • 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



    nrf52840dk_nrf52840.overlay


    With above-mentioned changes I could see USB disk with persistent storage after the reset.

    Best regards,
    Dejan


  • 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

  • Hi,

    There might be a problem with coexistence of storage partition with external flash partition. It would be useful if I could reproduce this issue. Could you make a minimal sample which I could use for this purpose?

    Best regards,
    Dejan

  • Hi,
    sure
    chatDK.zip

    Best regards,
    Serhii

Reply Children
  • Hi,

    I have tested your sample and found 2 pairs of conflicting lines in your prj.conf. 




    You should have assigned the value for each configuration option once.



    Best regards,
    Dejan

  • fixed it but the error is still the same

  • Hi,

    Could you share your changed prj.conf file?

    Best regards,
    Dejan

  • Hi,

    I have replicated your issue using NCS v2.3.0. There are currently 2 options how you can fix the build error. 

    First option:



    Second option:


    With either one of above-mentioned changes, you should be able to build your project successfully.

    Best regards,
    Dejan