LPC1343 USB MSC on-chip driver

Hi everyone...

I'm working with the SampleSoftware code bundle for LPC13xx from NXP For KEIL.
It has a sample code for USB MSC on-chip driver for LPC1343. I have a LPCXpersso Baseboard mounted with LPC1343 and a ULINK2 debugger.I used uVision4 as debugger/compiler for the sample software of USB MSC and build the code then start debugging. The code sample didn't work well as being expected; the new USB MSC is been enumerated or the new removable drive icons have shown in the disk drives; but if you do a double click to the new removable disk drive it can't be opened it says that you need to format the removable disk before you can use it. Is their something wrong with the codes? Any idea what's going on with this sample?
Thanks.

Parents
  • You seem to refer this sample bundle,

    Sample Code Bundle for LPC13xx Peripherals using Keil's MDK-ARM V1.04 (May 24, 2010)
    ics.nxp.com/.../code.bundle.lpc13xx.keil.zip

    The sample bundle has two Mass storage class examples,
    USBMem and USBMem_rom

    Which one are you running?



    Sound like the low-level USB functions are working fine, because the device is enumerated correctly. Problem lies in SCSI direct media access protocol. Maybe it's a trouble on sector number - memory address mapping.

    To prove this assumption, read out the sectors, MBR (1st), FAT (2nd), root directory (4th) and file contents (5th) of the device on your PC.
    Compare the contents of each sector with the contents of DiskImg.c
    Is there any gap between the read out and DiskImg.c?

    DiskImg.c
    
    const unsigned char DiskImage[MSC_ImageSize] = {
    // The first sector (512 bytes) - MBR
    0xEB,0x3C,0x90,0x4D,0x53,0x44,0x4F,0x53,0x35,0x2E,0x30,0x00,0x02,0x01,0x01,0x00,
    ...
    0x72,0x74,0x0D,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAC,0xCB,0xD8,0x55,0xAA,
    
    // The second sector (512 bytes) - FAT
    0xF8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    ...
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    
    ...
    ...
    

    Do you have any disk editor tool?
    If you don't have, download one.

    Disk Probe
    - Included in Windows install CD/DVD, in \Support\Tools folder
    or
    - Windows XP Service Pack 2 Support Tools
    " href= "www.theabsolute.net/.../dskinv.html">www.theabsolute.net/.../dskinv.html

    Tsuneo

Reply
  • You seem to refer this sample bundle,

    Sample Code Bundle for LPC13xx Peripherals using Keil's MDK-ARM V1.04 (May 24, 2010)
    ics.nxp.com/.../code.bundle.lpc13xx.keil.zip

    The sample bundle has two Mass storage class examples,
    USBMem and USBMem_rom

    Which one are you running?



    Sound like the low-level USB functions are working fine, because the device is enumerated correctly. Problem lies in SCSI direct media access protocol. Maybe it's a trouble on sector number - memory address mapping.

    To prove this assumption, read out the sectors, MBR (1st), FAT (2nd), root directory (4th) and file contents (5th) of the device on your PC.
    Compare the contents of each sector with the contents of DiskImg.c
    Is there any gap between the read out and DiskImg.c?

    DiskImg.c
    
    const unsigned char DiskImage[MSC_ImageSize] = {
    // The first sector (512 bytes) - MBR
    0xEB,0x3C,0x90,0x4D,0x53,0x44,0x4F,0x53,0x35,0x2E,0x30,0x00,0x02,0x01,0x01,0x00,
    ...
    0x72,0x74,0x0D,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAC,0xCB,0xD8,0x55,0xAA,
    
    // The second sector (512 bytes) - FAT
    0xF8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    ...
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    
    ...
    ...
    

    Do you have any disk editor tool?
    If you don't have, download one.

    Disk Probe
    - Included in Windows install CD/DVD, in \Support\Tools folder
    or
    - Windows XP Service Pack 2 Support Tools
    " href= "www.theabsolute.net/.../dskinv.html">www.theabsolute.net/.../dskinv.html

    Tsuneo

Children
More questions in this forum