This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Creating a usb storage devuce based on LP2148

Hi All.

I'm going to create some kind of usb storage device, and I'm planning to use LPC2148 microcontroller in it. I need some advices. Is this controller suitable for such task? Can external flash memory be mapped to the controllers adress space (to work with it like with internal controllers memory in the programm)? Which protocol is better to choose for this task (which one will be faster) to connect external memory chip and controller: I2C or something else?

Thanks for your answers!

Parents
  • Hello Alex,

    You asked: I'm going to create some kind of USB storage device, and I'm planning to use LPC2148 microcontroller in it

    Download the latest ARM evaluation demo at:

    http://www.keil.com\demo

    Install the Keil tools for ARM and look at this example on your hard drive at:

    \Keil\ARM\Boards\Keil\MCB2140\USBMem\Memory.Uv2

    From the Abstract.txt file:

     The Memory project is a demo program for the Keil MCB2140
    Board using the Philips LPC2148 Microcontroller.
    
    It demonstrates an USB Memory based on USB Mass Storage Class.
    

    More details are in the MCB2140 User's Guide, found at:

    http://www.keil.com/support/man/docs/mcb2140/mcb2140_ex_usbmem.htm

    If you had the full version of the Keil tools, you could modify the example under project-> options for target -> 'target' tab to include off chip memory.

    Keil also offers a flash file system call RL-FLash, which would help you organize data stored in external media. See:

    http://www.keil.com/support/man/docs/rlarm/rlarm_fs_flashfs.htm

Reply
  • Hello Alex,

    You asked: I'm going to create some kind of USB storage device, and I'm planning to use LPC2148 microcontroller in it

    Download the latest ARM evaluation demo at:

    http://www.keil.com\demo

    Install the Keil tools for ARM and look at this example on your hard drive at:

    \Keil\ARM\Boards\Keil\MCB2140\USBMem\Memory.Uv2

    From the Abstract.txt file:

     The Memory project is a demo program for the Keil MCB2140
    Board using the Philips LPC2148 Microcontroller.
    
    It demonstrates an USB Memory based on USB Mass Storage Class.
    

    More details are in the MCB2140 User's Guide, found at:

    http://www.keil.com/support/man/docs/mcb2140/mcb2140_ex_usbmem.htm

    If you had the full version of the Keil tools, you could modify the example under project-> options for target -> 'target' tab to include off chip memory.

    Keil also offers a flash file system call RL-FLash, which would help you organize data stored in external media. See:

    http://www.keil.com/support/man/docs/rlarm/rlarm_fs_flashfs.htm

Children
  • "I'm not sure yet will I stop on LPC2148 or on some of the HS MCUs."

    I think you've already have a LPC2148 board. As Kevin suggested, start your USB study on it. You can make a prototype on LPC2148, though your final goal is the handling of 1-2GBytes data. Once you've learned on an USB MCU, this experience is easily applicable to most of USB MCUs.

    As USB spec defines the behavior of USB engines on the device in details, the implementation of the USB engine is much the same for most of USB MCUs. Therefore, 80-90% of C source code is reusable even for other chip, just replacing the low-level handler.

    There are no difference on the host application, even when you change the USB MCU for the device, as long as the device has the same USB configuration.

    LPC2148 is equipped FS (Full-Speed) USB engine. Then, you cannot expect so fast transfer speed.

    Practical speed of FS bulk is 800 KBytes or so (Theoretically, 19 transaction/frame at most).

    64 (bytes/packet) x 13 (transaction /frame) x 1000 (frame /sec) = about 800 (KBytes/sec)

    As of FS HID, about 64 Kbytes/sec at most. It's the limit of interrupt transfer, on which HID is established.
    64 (bytes/packet) x 1 (transaction /frame) x 1000 (frame /sec) = about 64 (KBytes/sec)

    Tsuneo