Shared NAND memory

Discussion in 'The Projects Forum' started by sstbrg, Aug 19, 2011.

  1. sstbrg

    Thread Starter Active Member

    Nov 29, 2008
    Is it possible to share a NAND flash between the PC (USB 2 mass storage) and a CPU ?
    Meaning that on one hand I'll be able to write and read from the NAND flash using the CPU, and on the other hand I'll be able to connect it to USB and access it as mass storage device?

    I heard that Cypress make good USB chips, but I'm not sure how to begin with this project and which component to use.

    Thanks for any help :)
  2. SgtWookie


    Jul 17, 2007
    I don't see offhand how you'd be able to do that easily, as the USB access would conflict with the direct CPU access. The USB interface would use the file allocation system of the OS that was being used to organize the data on the memory. Perhaps you could allocate a file using the OS, and then only use the region of memory being used by the pre-allocated file for CPU I/O, but you would need some method of arbitration between which had access to the memory at what time.

    It seems like a rather complicated way of being forced to do business.
  3. sstbrg

    Thread Starter Active Member

    Nov 29, 2008
    Well I haven't asked my Rabbi yet, but like you said, the USB access would conflict with the direct CPU access, unless I'm using a Cypress West Bridge chip, which I haven't got access to unfortunately.

    So let's say that method isn't the way to go, therefore I'll have to build some sort of sharing system similar to what today's smartphones have got (hopefully not from scratch). I wonder if there's some free information about such systems used in smartphones.

    Basically the CPU will be the one to initally write the file on the NAND flash. I know how to construct and read a FAT32 format and I'm sure that eventually I'll be able to write it on the NAND flash.

    So as far as I can see, my problem is locating the proper USB PHY for the task of transferring data between USB and the NAND flash, and also how to provide access to the NAND flash from both the USB chip and the CPU (or FPGA...) . That's what I don't have any experience with :(

    Yeah, seems to be rather complicated to do from scratch, so hopefully there's an easier way...