Part Number: LM3S3748
Hello TI expert,
I know this LM3s3748 is very old and obsolete, but this time out company need make program for custommer on their deboard.
We need make firmware interface compputer by USB protocol.
Example we base on "SW-EK-LM3S3748-10636" pack.
Using SDK: keilc for arm uVision V5.31.0.
We rebuild all the USB example demo after install "SW-EK-LM3S3748-10636.exe" pack with path file: C:\StellarisWare\boards\ek-lm3s3748
But it seem all project is hangging.
After debugging i see that it hangging at USBDCDInit() function if call SysTickIntEnable(),
If comment SysTickIntEnable() function it not hanging but cannot detect USB on Device anager system.
Bellow is my main code, i base on "USB_dev_bulk" example:
int main()
{
unsigned long ulTxCount;
unsigned long ulRxCount;
// Not configured initially.
g_bUSBConfigured = false;
SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ); // we using external crystall 16M
g_bUSBConfigured = false;
gpioInit();
uartInit();
UARTStdioInit(1);
UARTprintf("Main start\n");
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);
SysTickPeriodSet(SysCtlClockGet() / SYSTICKS_PER_SECOND);
SysTickIntEnable(); // it make hangging at USBDBulkInit()->USBDCDInit()->SysCtlClockGet()->SysCtlDelay()
SysTickEnable();
// Initialize the transmit and receive buffers.
USBBufferInit((tUSBBuffer *)&g_sTxBuffer);
USBBufferInit((tUSBBuffer *)&g_sRxBuffer);
// Pass our device information to the USB library and place the device on the bus.
USBDBulkInit(0, (tUSBDBulkDevice *)&g_sBulkDevice);
// Clear our local byte counters.
ulRxCount = 0;
ulTxCount = 0;
while(1)
{
// blinkingLED();
if(g_ulFlags & COMMAND_STATUS_UPDATE)
{
// Clear the command flag
g_ulFlags &= ~COMMAND_STATUS_UPDATE;
}
if(ulTxCount != g_ulTxCount)
{
// Take a snapshot of the latest transmit count.
ulTxCount = g_ulTxCount;
}
if(ulRxCount != g_ulRxCount)
{
// Take a snapshot of the latest receive count.
ulRxCount = g_ulRxCount;
}
}
}
if call SysTickIntEnable() function, debug hangging in order of function call: USBDCDInit(ulIndex, psDevice->psPrivateBulkData->psDevInfo);->SysCtlClockGet(0x000010748)->SysCtlDelay(0x0000028C) like this picture





