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

LPC2388: Using USB OHCI and SD/MMC at the same time

Hello,

I have to use both usb host as mass storage with USB stick and MMC card with the LPC2388.

I successfully took the examples MSD_FILE for usb sticks and SD_FILE for sd-cards and integrated that in my own application separately.

But when I try to activate both interfaces the finit(NULL) call takes significantly more time and returns 1.

I'm using the MCB2300 eval board at the moment. The following changes I made with the original examples:

In the file usbh_ohci_lpc23xx.c I changed the
Start address of memory used by OHCI to 0x7FD02000

as the Memory Card Drive 0 uses 0x7FD00000 as Base address for the Relocate Cache Buffer.

In the file File_config.c I cleared the checkbox of Default Drive [U0:].

If I deactivate the USB Flash drive 0, the finit(null) call returns successfully 0 and I 'm able to use the SD-card.

What do I miss in my project to use both of that interfaces?

Thanks in advance and best regards
Hubert

  • Ok, I found the mistake!

    in the finit call I have to give the "M0:" as argument even if it's checked as default drive.

    Now everything works.

    finit("M0:") successfully initializes the sd-card

    and

    finit("U0:") successfully initializes the usb stick.

    regards
    Hubert