Skip to main content
afinko
Associate II
July 13, 2010
Question

How to remove NAND flash disk from Mass Storage Demo?

  • July 13, 2010
  • 4 replies
  • 1299 views
Posted on July 13, 2010 at 09:08

How to remove NAND flash disk from Mass Storage Demo?

    This topic has been closed for replies.

    4 replies

    jfong
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:58

    Hi!

        These names are in file scsi_data.c

        You have two ways to remove the NAND disk from demo,

        1. Study the codes through, then you will know what to remove.

        2. Remove the files fsmc_nand.c/h from demo first and rebuild the project, let the compiler tells you what is missing and remove it. Repeatly doing this until there is no errors:-)

    afinko
    afinkoAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:58

    >The ''#define MAX_LUN 1'' in file mass_mal.h is a dummy. Instead, modify the variable ''Max_Lun'' in file usb_prop.c. If your project works on NAND and SD both, just change this variable to 0 is enough to make PC sees only the SD and it will work(no reason not to).

    I changed ''#define MAX_LUN 0'' in file mass_mal.h as well as ''Max_Lun'' in file usb_prop.c. Now it works without problem. Thanks for advice.

    Just to complete the information where are stored the string information about USB device:

    it is in scsi_data.c as well as in usb_desc.c

    afinko
    afinkoAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:58

    >    These names are in file scsi_data.c

    Thanks for that. I used CTRL+F function for finding it, but it is in:

     'S', 'T', 'M', ' ', ' ', ' ', format, so I was unsuccessful.

    >   You have two ways to remove the NAND disk from demo,

    >   1. Study the codes through, then you will know what to remove.

    >   2. Remove the files fsmc_nand.c/h from demo first and rebuild the project, let the compiler tells you what is missing and remove it. Repeatly doing this until there is no errors:-)

    The problem is, that even if I remove all the functions connected with NAND, there will be two disks in PC. I need to find where it is configured to use two disks for mass storage demo and change it to one. I already removed the NAND functions. I even do not have the NAND chip on my own hardware, but in PC there are still two disks :(

    I tried to change the:

    #define MAX_LUN  1

    to #define MAX_LUN  0

    in mass_mal.h

    there was only one disk in PC, it was only SD card (lucky), but the SD card was not working properly. I wasn't able to read and write to the SD card without error.

    jfong
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:58

        The ''#define MAX_LUN 1'' in file mass_mal.h is a dummy. Instead, modify the variable ''Max_Lun'' in file usb_prop.c. If your project works on NAND and SD both, just change this variable to 0 is enough to make PC sees only the SD and it will work(no reason not to).