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.
Tool/software:
Hi,
My customer is currently evaluating USB CDC communication using TMS320F28384S on their custom board with a USB Type-C connector.
They are using the usb_ex1_dev_serial.c sample code included in C2000Ware v5.04.
・C2000Ware_5_04_00_00\driverlib\f2838x\examples\c28x\usb\usb_ex1_dev_serial.c
However, during testing, only the USB suspend interrupt occurs, and the device is not recognized by the PC.
Within the sample code, we found that several important settings are commented out, as shown below.
We would like to confirm with TI engineers whether these settings must be enabled to properly operate USB CDC on the F28384S, and if any additional configurations are required.
【Commented-out portions in the sample code】
// 1. USB Clock configuration
SysCtl_setAuxClock(DEVICE_AUXSETCLOCK_CFG_USB);
// 2. USB CDC device initialization
USBDCDCInit(0, &g_sCDCDevice);
// 3. USB interrupt registration
Interrupt_register(INT_USBA, &INT_myUSB0_ISR);
// 4. DP/DM pin MUX configuration (if not included in Device_initGPIO)
GPIO_setPinConfig(GPIO_42_USB0DM);
GPIO_setPinConfig(GPIO_43_USB0DP);
We would appreciate your clarification on the following points:
Thanks,
Conor
Conor,
Unknown device indicates that the usb enumeration itself failed and hence there is no further communictation between the host and the device.
The commented out code is now generated by Sysconfig and hence it's not needed.
Few things to check are if the GPIOs are curretly configured and the auxillary clock is configured to 60 mHz
Best Regards.
Siddharth
Hi Siddharth,
Thank you for your reply.
We would like to know where exactly to implement or modify the following two points in the usb_ex1_dev_serial.c sample code:
■GPIO Pin Configuration
Where should they add the code to configure GPIO42 (USB0DM) and GPIO43 (USB0DP) properly for USB functionality in the sample?
■Auxiliary Clock (USB Clock) Configuration
Where should they add or adjust the code to set up 60 MHz Auxiliary Clock required for USB operation?
Thanks,
Conor
Conor
Are you using the Sysconfig generated code? If so, then you can look at Board_init() function to see the GPIO configuration.
You can also look at the USBGPIOEnable() function in the usb_hal.c file for it.
Regarding the clock configuration. you can take at the macro in usb_hal.h file.
DEVICE_AUXSETCLOCK_CONFIG_USB .
This is configured assuming the XTAL frequency is 20MHz or 25MHz.
Since this is a custom board, I am not sure on what XTAL is being used.
SysCtl_setAuxClock(DEVICE_AUXSETCLOCK_CONFIG_USB) needs to be added in the code if required.
Best Regards
Siddharth
Hi Siddharth,
I have confirmed that the IO settings have been configured without any problems.
Also, if using an external 16MHz crystal, are the following clock settings correct?
ーーーーーーーーーーーーーーーーー
#define DEVICE_AUXSETCLOCK_CONFIG_USB (SYSCTL_AUXPLL_OSCSRC_XTAL | \
SYSCTL_AUXPLL_IMULT(30) | \
SYSCTL_REFDIV(2U) | \
SYSCTL_ODIV(2U) | \
SYSCTL_AUXPLL_DIV_2 | \
SYSCTL_AUXPLL_ENABLE | \
SYSCTL_DCC_BASE_0)
ーーーーーーーーーーーーーーーーー
After setting the above, will the clock settings be complete if I add SysCtl_setAuxClock(DEVICE_AUXSETCLOCK_CONFIG_USB) to the code?
Thanks,
Conor