Hi! I'm beginner in ARM. I tried to compile the example "...MCB2300\RL\USB\HOST\MSD_File" for LPC2388. Host connector (USB-A) on my evaluation board is connected to port U1, and device connector (USB-B) is connected to port U2 (as opposed to the MCB2388).
The MCU not "saw" the usb flash and sent message "Drive not connected, please connect it ..." to terminal window. Using the "Configuration Wizard" I changed "USB Host 0" to "USB Host 1". I got the following error: Build target 'MCB2300' compiling usb_config.c... e:\Keil\ARM\RV31\INC\usb_lib.c(61): error: #20: identifier "USBH1_HWD_OHCI" is undefined e:\Keil\ARM\RV31\INC\usb_lib.c(107): error: #28: expression must have a constant value Target not created
When I manually changed (for testing only) undefined USBH1_HWD_OHCI to USBH_HWD_OHCI , I got linker error: Build target 'MCB2300' compiling usb_config.c... linking... .\Obj\MSD_File.axf: Error: L6218E: Undefined symbol usbh1_hcd_ohci (referred from usb_config.o). .\Obj\MSD_File.axf: Error: L6218E: Undefined symbol usbh1_hwd_ohci (referred from usb_config.o). Target not created
In what may be the cause of the error? What have I missed to adapt this example for my evaluation board? (I also reconfigured serial output to UART0 and disabled output to LCD display)
> Using the "Configuration Wizard" I changed "USB Host 0" to "USB Host 1".
Sound like you've touched to usb_config.c
To move the host port, usbh_ohci_lpc23xx.c should be changed.
usbh_ohci_lpc23xx.c #define USBH_OHCI_PORTS 0x00000002 // <-- 0x00000001
On the Configuration Wizard of this file, you'll see "Root Hub ports used by OHCI Controller"
Tsuneo
Ah, I remember. Another modification is required on usbh_ohci_lpc23xx.c
usbh_ohci_lpc23xx.c BOOL usbh_ohci_hw_init (BOOL on) { ... /* Port 2 is used for USB host */ // USBPortSel &= ~0x01; /* Enable Port 2 as Host port */ /* Port 1 is used for USB host */ USBPortSel |= 0x03; /* Enable Port 1 as Host port */
Thank you very much. Now, I also check PINSEL. I hope I will solve this problem. :)