This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USB Mass storage class module

Hello guys,

In our current project, we need to have the ability to copy .bmp images from our PC directly to W25N01GVZEIG TR QSPI flash memory of NAND type. To the best of my knowledge, the best starting point for us would be to use  usbd_msc (USB Mass Storage Class module) example from $SDK_ROOT/examples/peripheral/usbd_msc. Our NAND flash is 128MB in size. Am I right or there is some better point to start with?

Also, I noticed some people here on the forum reporting difficulties when using the USB Mass Storage Class module with QSPI flash memories of NAND type (e.g. here). Is that issue resolved now with SDK 15.3.0?

Finally, is errata 187 resolved with SDK 15.3.0 (I could not find nrf_drv_usbd_errata.h file)?

Thank you very much for your time and effort. It is really appreciated.

Cheers,

Bojan.

Parents
  • Hello, 

    Am I right or there is some better point to start with?

     Yes, the USB MSC example is a good starting point, but I would also recommend the QSPI example to ensure the communication with your flash device.

    Is that issue resolved now with SDK 15.3.0?

    From the datasheet of the device, I could not see any issues, as it supports QSPI. You can try the QSPI example to ensure functionality.

    Finally, is errata 187 resolved with SDK 15.3.0 (I could not find nrf_drv_usbd_errata.h file)?

    The workaround is implemented in the SDK I believe.

    Kind regards,
    Øyvind

  • Hello Øyvind,

    Thanks for replying. We tested the QSPI example as well. It is functional.

    However, nRF52840-DK board contains MX25R6435F flash memory of NOR type and 8MB in size. On our custom board, we would like to use high-capacity (128MB) W25N01GVxxIG/IT flash of NAND type. While reading through the forum I realized some people are complaining about using USB Mass Storage Class with QSPI flash memories of NAND type (e.g. here). That is why I wanted to double-check and see if there is any still existing issue for using QSPI flash memories of NAND type with USB Mass Storage Class.

    Sincerely,

    Bojan.

  • Are some of the following 1Gb NOR flash memories coming from Macronix compatible with the NOR flash we have on nRF52840-DK board:

    Sincerely,

    Bojan.

  • Hello,

    I have discussed the issue with the systems team again and the first link you have, is a suggestion from them as well:
    MX66U1G45G (1.8V)
    MX66L1G45G (3.0V)
    They say that the two others should work as well.

    Since the Flash is >128Mb the interface needs to use 32-bit addressing mode. That is set in IFCONFIG0 in the QSPI peripheral

    Hope this helps!

    Kind regards,
    Øyvind

  • Thanks, Øyvind.

    We will now continue developing with nRF52840-DK board. Once we design our custom hardware with MX66L1G45G NOR flash and we test it, I will come back here to report you about the success.

    Sincerely,

    Bojan.

  • Hello ,

    Here I am after a few months with the custom board containing MX66L1G45G (3.0V) memory module. I changed addressing mode to 32-bit in usbd_msc example, like you suggested. I did that change within sdk_config.h file:

    // <o> QSPI_CONFIG_ADDRMODE  - Addressing mode.
     
    // <0=> 24bit 
    // <1=> 32bit 
    
    #ifndef QSPI_CONFIG_ADDRMODE
    #define QSPI_CONFIG_ADDRMODE 1
    #endif
    
    // <o> NRFX_QSPI_CONFIG_ADDRMODE  - Addressing mode.
     
    // <0=> 24bit 
    // <1=> 32bit 
    
    #ifndef NRFX_QSPI_CONFIG_ADDRMODE
    #define NRFX_QSPI_CONFIG_ADDRMODE 1
    #endif

    However, I am still getting the error - Disk initialization failed.

    First question, do I properly change the addressing mode? After that, is there anything else I need to change in order to make usbd_msc example working with our new flash memory?

    I tested QSPI example with our custom board and it was OK. QSPI interface between nRF52840 and flash memory seems to be OK. Here is what I get with 24-bit addressing mode:

    <info> app: QSPI write and read example using 24bit addressing mode
    <info> app: QSPI example started.
    <info> app: Process of erasing first block start
    <info> app: Process of writing data start
    <info> app: Data read
    <info> app: Compare...
    <info> app: Data consistent
    <info> app: Flash ID: 0xC2201B

    When I changed the addressing mode to 32-bit the way I described before, QSPI example was not functional (inconsistent data):

    <info> app: QSPI example started.
    <info> app: Process of erasing first block start
    <info> app: Process of writing data start
    <info> app: Data read
    <info> app: Compare...
    <info> app: Data inconsistent
    <info> app: Flash ID: 0xC2201B

    Thank you very much for your time and effort.

    Sincerely,

    Bojan.

  • Hello ,

    Do you recommend a different flash we are willing to use something in the capacity of 32mb instead of the one above. We want to make sure the FATFS works on it just like it does on the dev board NRF52840.

    Thank you

Reply Children
Related