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

Interfacing USB Pen Drive to MCB2300 V4.50 (LPC2387)

Hi, I am using MCB2300 (mounted with LPC2387) which i want to act as USB Host for USB Pen Drive.
I tried downloading the example code of http://www.keil.com/support/man/docs/rlarm/rlarm_fs_ex_msd.htm. but it says "Drive not connected, please connect it ..." .
I observed, that USB pen drive is not powered up when it is connected to MCB2300 eval kit. The LED on it lights up when connected to PC.
Please guide me, do i need to enable any thing in software or change any sought of jumper settings on eval board.

  • > I am using MCB2300 (mounted with LPC2387)

    The USB standard-A receptacle on the MCB2300 board works just for LPC2388, which has the second USB port.

    http://www.keil.com/mcb2300/mcb2300-schematics.pdf

    a) You may replace LPC2387FBD100 to LPC2388FBD144.

    OR

    b) Make up extra connections for the standard-A receptacle, so that it connects to the "first" USB port (USBD+A / USBD-A, etc). Modify the firmware example, so that it uses the "first" USB port.

    Tsuneo

  • Hi, I am shocked to hear this. Is this mentioned anywhere, which i missed out, please share the link/document.
    And as you have mentioned, it means that this is the limitation of the mcb2300 board lying with me. By upgrading the Controller to LPC2388 or by modifying the connections from USB B to USB A, i would be able to work out USB A connector. I will work out the feasible option.
    But Just in case, if i change the USB connector connections, can u please suggest, which firmware example should i use for development.
    And Really thanks for your reply, it saved much of my future time that i was going to put in debugging why USB A connector is not working on MCB2300 with LPC2387 on it.

  • I got to above conclusion, seeing the schematic of MCB2300 board on the Keil's web.
    http://www.keil.com/mcb2300/mcb2300-schematics.pdf

    Sheet #6 of the schematics shows the circuit around the USB-A receptacle.
    You'll see these USB-A connections on the schematics,

    D+2 -- R83 -- P0.31
    D-2 -- R82 -- USBD-B

    P0.31 and USBD-B pins are seen just on LPC2388 (IC4, on sheet #1), not on LPC2387 (IC10, on sheet #5)

    But Keil mounts the USB-A receptacle on MCB2387, though they don't put the receptacle on MCB2360/2370

    Pictures of MCB2360/2370/2387/2388
    http://www.keil.com/support/man/docs/mcb2300/mcb2300_intro.htm

    I recommend you to contact to Keil support to ask why MCB2387 mounts unused USB-A receptacle. They may have updated the board circuit from above schematics.

    Tsuneo

  • Just note that the MCB2300 board supports a large number of LPC23xx chips (and could be used with a number of LPC17xx chips too) so it is always important to check the user manual for the used processor to make sure what is supported by the specific processor.

  • Hi, Thanks for all the inputs,
    I did a little study of the USB ports in lpc2378 and the MCB2300 schematics. Now I too realized that mcb2300 eval kit lying with me needs a little hardware changes. so as to make USB host operational. I have started by using P0.29(USB:D+A),and P0.30(USB:D-A) and P1.18(USB_UP_LED). Currently i am not using LM3526 for providing the supply to USB port. I am providing 5V directly to USB port via eval kit.
    I am thinking of using the LPC2388 example to start the activity, will do firmware changes to map the USB ports. I will start the activity and inform about the progress on this forum so that it can be of help to others. Thanks once again.

  • To connect the USB-A receptacle to the USB port1 pins on the MCB2300 board,
    place these extra jumpers at the pads around the MCU.

    LPC2387            LPC2388
    USB port 1         USB port 2
    
    USB_D+     P0.29 - P0.31  USB_D+2
    USB_D-     P0.30 - USBD-B
    USB_PPWR1  P1.19 - P0.12  USB_PPWR2
    USB_PWRD1  P1.22 - P1.30  USB_PWRD2
    USB_OVRCR1 P1.27 - P1.31  USB_OVRCR2
    

    Keil host examples are modified as follows,

    C:\Keil\ARM\Boards\Keil\MCB2300\RL\USB\Host\HID_Kbd\usbh_ohci_lpc23xx.c
    C:\Keil\ARM\Boards\Keil\MCB2300\RL\USB\Host\MSD_File\usbh_ohci_lpc23xx.c
    
    #define USBH_OHCI_PORTS             0x00000002     // <--- 0x00000001 for USB port1
    
    
    BOOL usbh_ohci_hw_pins_config (BOOL on) {
      // USB_D+     P0.29  PINSEL1 bit27:26 01
      // USB_D-     P0.30  PINSEL1 bit29:28 01
      // USB_PPWR1  P1.19  PINSEL3 bit 7: 6 10
      // USB_PWRD1  P1.22  PINSEL3 bit13:12 10
      // USB_OVRCR1 P1.27  PINSEL3 bit23:22 10
    
      // Reset pin functions
      PINSEL1   &= ~((3 << 26) | (3 << 28));
      PINSEL3   &= ~((3 <<  6) | (3 << 12) | (3 << 22));
    
      if (on) {
        // Set pin functions
        PINSEL1   |=  ((1 << 26) | (1 << 28));
        PINSEL3   |=  ((2 <<  6) | (2 << 12) | (2 << 22));
      }
      return (__TRUE);
    }
    
    
    BOOL usbh_ohci_hw_init (BOOL on) {
        ...
        ...
        /* Port 2 is used for USB host                                            */
        USBPortSel    &= ~0x01;             /* Enable Port 2 as Host port         */
              // <--- delete this line
    

    Tsuneo

  • Hi thanks for the data.
    I had one query regarding the Hardware connections and number of pins used for USB port 1.
    I have prepared a setup where, i have mounted a separate USB connector on veroboard. I have connected its USB connectors (D+ and D-) to the LPC2387 (P0.29 and P0.30) respectively. Power(5Vdc and Gnd) to the USB connector on veroboard is provided directly via the supply pins provided on evaluation kit (5V, GND).

    I haven't used P1.19, P1.22 and P1.27. I am doing this because In our project, we will be providing continuous 5v supply to the USB connector. it won't be via LM3526.
    Does the host controller inside LPC2387 require USB power read (USB_PWRD1) signal for its functionality.
    If i leave this pins (USB_PWRD1 - P1.22) and (USB_OVRCR1 P1.27) unconnected, will my USB host code still work properly.(/b)

  • Hi, Please ignore my previous reply.
    I tried to change the hardware as mentioned in your reply except the jumper between P1.31 and P1.27. as when i connected this jumper, my code behaves in an abnormal way. Nothing is getting displayed on LCD. So i left that jumper unconnected.
    But still there is no difference. The output still says the Drive is not connected, please connect it and the light on USB pen drive is also not glowing.
    To enable the USB power supply, I tried to pull down the LM3526 enable pin(P1.19) by configuring it as IO pin and then setting the pin direction as Output and then clearing P1.19. But still it didn't helped.
    I am stuck at this status where, i have done the jumper connections on the pads around the micro-controller, loaded the modified software, but still the output says Drive not connected, please connect it.

    Require your help to diagnose the problem, please help.

    Jagdish