This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LM3S3748: All LM3S3748 USB example not work.

Part Number: LM3S3748

Hi every body,

I have project with LM3S748 chipset, it very old MCU.

I make project with USB, before that i install pakage: "SW-EK-LM3S3748-5451.exe"

I check all USB examples in  StellarisWare folder after install "SW-EK-LM3S3748-5451.exe" package.

I flash USB firmware but it seem don't work, check on device manager i don't see any new device on it.

I also debug in main of "USB_dev_bulk" example, the USBDBulkInit() return not nill.

So do any one meet same issue and have experience with LM3s USB family, please give me the suggestion?

thank you so much!

int  main(void){


    unsigned long ulTxCount;
    unsigned long ulRxCount;
    volatile tUSBDBulkDevice* myUSB;

    char pcBuffer[16];

    // Set the clocking to run from the PLL at 50MHz
    SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);

    gpioInit();

    g_bUSBConfigured = false;

    SysCtlPeripheralEnable(USB_MUX_GPIO_PERIPH);
    GPIOPinTypeGPIOOutput(USB_MUX_GPIO_BASE, USB_MUX_GPIO_PIN);
    GPIOPinWrite(USB_MUX_GPIO_BASE, USB_MUX_GPIO_PIN, USB_MUX_SEL_DEVICE);

    // Enable the system tick.
    SysTickPeriodSet(SysCtlClockGet() / SYSTICKS_PER_SECOND);
    SysTickIntEnable();
    SysTickEnable();

    // Initialize the transmit and receive buffers.
    USBBufferInit((tUSBBuffer *)&g_sTxBuffer);
    USBBufferInit((tUSBBuffer *)&g_sRxBuffer);

    myUSB = USBDBulkInit(0, (tUSBDBulkDevice *)&g_sBulkDevice);


    if(myUSB->usVID == 0x1cbe){
        GPIOPinWrite(GPIO_PORTG_BASE, GPIO_PIN_0, GPIO_PIN_0);//ADD MORE: GPIO_PIN_0 is high so USBDBulkInit() return USB VID: 0x1cbe
    }else{
        GPIOPinWrite(GPIO_PORTG_BASE, GPIO_PIN_0, 0x00);//ADD MORE
    }


    if(myUSB->usPID == 0x0003){
        GPIOPinWrite(GPIO_PORTG_BASE, GPIO_PIN_1, GPIO_PIN_1);//ADD MORE: GPIO_PIN_1 is high so USBDBulkInit() return USB PID: 0x0003
    }else{
        GPIOPinWrite(GPIO_PORTG_BASE, GPIO_PIN_1, 0x00);//ADD MORE
    }


    // Clear our local byte counters.
    ulRxCount = 0;
    ulTxCount = 0;


    // Main application loop.
    while(1){
        // Have we been asked to update the status display?
        if(g_ulFlags & COMMAND_STATUS_UPDATE){
            // Clear the command flag
            g_ulFlags &= ~COMMAND_STATUS_UPDATE;
        }

        // Has there been any transmit traffic since we last checked?
        if(ulTxCount != g_ulTxCount){
            // Take a snapshot of the latest transmit count.
            ulTxCount = g_ulTxCount;
        }

        // Has there been any receive traffic since we last checked?
        if(ulRxCount != g_ulRxCount){
            // Take a snapshot of the latest receive count.
            ulRxCount = g_ulRxCount;
        }

    }
}