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.

CDC on USB1 in SYS/BIOS

I am working on a custom board similar to the EVMSK; one difference, though, is that USB1 is intended to be its primary USB interface. After a hardware problem was found with the original interface, one board was modified to use USB0, I adapted code from the TI-RTOS 1.21.0.9 USBCDCD example, and it worked well. Now, that the USB1 hardware problem has been resolved, I am having trouble modifying the software to use USB1.

When I compile to use USB0, the software always reaches a breakpoint in function USB0DeviceIntHandler. With USB1, the software never reaches a breakpoint in function USB1DeviceIntHandler.

Here is a list of the changes I have made trying to get USB1 working:

  1. In function USBCDCD_hwiHandler, replace call to USB0DeviceIntHandler with call to  USB1DeviceIntHandler.

  2. In function USBCDCD_init, in the call to Hwi_create, changed first parameter (INT_USB0) to INT_USB1.

  3. In function USBCDCD_init, in the call to USBDCDCInit, replace first parameter with 1.

  4. In file usbdenum.c, function USBDeviceEnumHandler, changed a call to USBDReadAndDispatchRequest to use parameter ulIndex rather than a hard-coded 0.

Note that in the example I followed, function USBCDCD_init has a call to USBStackModeSet. This function seems not to be found in my version of the USB library. It compiled and worked fine with this call commented out. I have stepped through initialization to verify that the driver does have USB1 in device mode.

I am using Code Composer Studio version 5.4.0.00091, BIOS version 6.35.1.29.

Could anyone suggest any other software changes to try?

  • Moving this to the SYS/BIOS forum.

  • Which hardware platform is the "EVMSK?"  Is that the AM335x?

    I'm not sure which device specific files you are using, but I'm wondering about the following array that's in src/examples/DK_TM4C123G/DK_TM4C123G.c:

    /* USBMSCHFatFs configuration structure, describing which pins are to be used */
    const USBMSCHFatFsTiva_HWAttrs usbmschfatfstivaHWAttrs[DK_TM4C123G_USBMSCHFatFsCOUNT] = {
        {INT_USB0}
    };

    INT_USB0 looks to be a macro defined in TivaWare.  You may need to handle this array and macro, too.

    Steve

  • It is the AM3552.

    Missing a configuration item like this is one of my main theories. I have not found a file or an array like this in my project, but I'll keep looking.

    thanks, Kevin

  • In the course of debugging this problem, I discovered several more cases where USB0 was hard-coded in the USB driver. None of these changes solved my problem, but hopefully this post will be able to help solve someone else’s problem.

     

    In file usbdenum.c, function USBDSetConfiguration, call to function USBDeviceConfig.

     

    In file usbcdc.c, function HandleRequests, calls to functions USBDCDSendDataEP0 and USBDCDRequestDataEP0.