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

Reply
  • 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).

Children
  • "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?