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.
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