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

interface camera with MCB2300

I want to interface camera to MCB2300 through USB interface. Please let me know how this should be done.

Parents
  • I have MCB2300 board with LPC2387, this processor has the USB host controller. I have downloaded from npx.com the example 'USBHostLite for LPC23xx/LPC24xx V1.00' but it seems not work. Now, I have problem with the 'Host_Init' function, could you help me with any example code?

Reply
  • I have MCB2300 board with LPC2387, this processor has the USB host controller. I have downloaded from npx.com the example 'USBHostLite for LPC23xx/LPC24xx V1.00' but it seems not work. Now, I have problem with the 'Host_Init' function, could you help me with any example code?

Children
  • What problem, exactly, do you have?

    "could you help me with any example code?"

    How do you expect anyone to know if their example code will help you when you don't say what help, exactly, you need?!

    You said you already have example code - from NXP. If you can't use that, why do you think that you will be able to use any other random example code?

    What study and debugging have you done to determine where the problem(s) lie in the code that you already have?

  • Why don't you use the samples provided with the latest MDK (for USB host) ? They work very well - I tested them myself!
    P.S
    Why do you hijack threads?

  • First, thanks for your answer and sorry for my imprecise question.
    I have download uVision4.14, i have tested on my board the USBMem sample and it works. I don't find for MCB2300 the sample for the usb host. What samples for usb host do you mean?
    I need a usb host sample for recognize a usb device and so I download the USBHostLite example.
    In this sample the Host init function don't work: I have used uart debug string and also the
    uVision4 debug mode. The code that don't work is:

    USB_INT32U pinsel;
    PRINT_Log("Wait Host Init...\n");
    PCONP |= 0x80000000; //Power USB

    VICIntEnClr = (1 << 22); // Enable the USB interrupt source

    USBClkCtrl = 0x00000009;
    while ((USBClkSt & 0x00000009) == 0) {
    PRINT_Log("wait...\n");

    }

    // Set port func bits so that both U1 and U2 can be hosts.
    USBPortSel &= ~0x03;
    USBPortSel |= 0x01;


    I have changed part of code with this:
    USBClkCtrl = 0x12;
    while ((USBClkSt & 0x12) != 0x12);


    but then I have a problem with this instruction 'USBPortSel' (any setting crash):
    USBPortSel &= ~0x03;
    USBPortSel |= 0x01;


    I don't have any device attached and the hardware seems ok.
    D- in connected to USBD-B with 15k pull-down resistor (pin 37) and D+ in connected with P031 with 15k pull-down resistor (pin 36).

  • "In this sample the Host init function don't work"

    That tells us virtually nothing!

    It's like saying, "My car doesn't work - what's wrong with it?"

    You need to describe precisely what you expected it to do, precisely what it actually did and - most importantly - what you have done in your attempts to account for the difference!

    "I have used uart debug string"

    What UART debug string?

    How did you use it?

    What did you find out from using it?

    "also the uVision4 debug mode"

    Again, how, exactly, did you use it?

    Did you use JTAG to access the actual hardware?

    What did you find out from using it?