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.
I have imported the USB boot loader example into CCS. I have modified the code so that instead of having a HID mouse and DFU it has an CDC and DFU. When I start the application windows finds the device. It automatically uses the driver for the CDC. I can then write to a terminal. So no issues with that. However the DFU comes up as other devices without a driver. I tried to install a driver by pointing the search to the drivers directory of the TIVA ware folder. But it doesn't install any driver. Anyone know what the issue could be? Thanks
Hi Jon,
That file is part of the flash boot loader, you will find it at [Install Path]\TivaWare_C_Series-2.2.0.295\boot_loader
Hi Charles
Yes I will try running the design without mods. I dont really see where that example is using the file that you mentioned. I even tried changing the value but it didnt make any difference, Anyway I will try running the example as is and let you know.
Jon
Hi Jon,
Never mind about my original reply about changing the USB_O_CC register. The boot_demo_usb will call the ROM-based bootloader by calling ROM_UpdateUSB(0). I was mistaken to think that you are using the flash-based bootloader.
Hello Jon,
Which version of TivaWare do you have and which drivers are you using from it?
Hi Ralph
Its 2.2.0.295. I am just pointing the driver installer to the drivers dir of the TivaWare.
Regards
Jon
Hi Jon,
Okay, let me look into this on my end... this is a recent release so maybe there as an issue there.
In the meantime, use the drivers from here and see if that fixes it: software-dl.ti.com/.../SW-TM4C-2.1.4.178.PATCH-1.0.zip
Hi
I manged to use the dfuprog to get the connected DFU info. That works fine for the example design that isn't changed.
I am still having issues now with the design that I modified. I have a DFU and also a CDC.I can see the CDC in windows device manager and write text to a terminal. But the DFU is still coming up as unknown even though I have the DFU driver installed now. I haven't really changed any of that code in the example design. If I try to install the driver that worked on the other design, Windows just says that it cant find any driver.
It seems that the only difference between the DFU working and not working is if I use the CDC device rather than the mouse device. If I use the CDC as the control then it wont work. But yet the CDC does work OK. Below is the CDC device.
tUSBDCDCDevice usb_cdc_dev = { USB_VID_TI_1CBE, USB_PID_COMP_HID_DFU, 500, USB_CONF_ATTR_SELF_PWR, usb_cdc_ctl_handler, (void *)&usb_cdc_dev, USBBufferEventCallback, (void *)&usb_cdc_rx_buf, USBBufferEventCallback, (void *)&usb_cdc_tx_buf, g_ppui8StringDescriptors, NUM_STRING_DESCRIPTORS };
Thanks
Jon
Hi,
I will need to pass your question to our USB expert. The boot_demo_usb example uses the boot_demo_usb.inf for Windows driver and this is for the composite device supporting HID mouse with DFU. If you change to CDC with DFU, I wonder if this file needs to be modified. You might need to create a separate one. Note that all the .inf files are in the same <TivaWare_Installation>/windows_drivers folder. Another suspicion I have is that if the Windows searches the usb_dev_serial.inf instead because it thinks that you have a CDC device. The usb_dev_serial.inf is only for CDC class not for composite (CDC and DFU).
; ----------------------------------------------------------------------------- ; ; TivaWare USB DFU Runtime device driver installer ; ; The composite devices supported by this INF file contains a HID mouse with ; a Device Firmware Upgrade runtime interface (basically, just a stub that ; tells the host that the device supports DFU). Since HID is supported ; natively by Windows, no HID-specific sections are required here. All this ; file does, therefore, is ensure that the DFU drivers and WinUSB subsystem ; are installed to support switching from DFU runtime mode into "real" DFU ; mode in preparation for download and upload operations. ; ; This device offers DFU on interface number 1 and publishes PID 0x0A while in ; runtime mode. When it is switched to DFU mode (implemented by the boot_usb ; boot loader), the device reenumerates and publishes PID 0xFF instead. This ; is seen as a different device by Windows and requires a second INF file to ; support it. This INF file is boot_usb.inf which installs exactly the same ; files as this one. ; ; ----------------------------------------------------------------------------- ; NOTE: When you customize this INF for your own device, create a new class ; name (Class) and a new GUID (ClassGuid). GUIDs may be created using the ; guidgen tool from Windows Visual Studio or the Windows SDK. [Version] Signature = "$Windows NT$" Class = USBLibDFURuntimeDeviceClass ClassGuid={0D42186B-31A8-4800-B875-1A5525A407B9} Provider = %ProviderName% CatalogFile=boot_demo_usb.cat DriverVer=04/02/2020,2.2.0.295 ; ========== Manufacturer/Models sections =========== [Manufacturer] %ProviderName% = USBLibDFUDevice_WinUSB,NTx86,NTamd64 ; NOTE: Replace the VID and PID in the following two sections with the ; correct values for your device. [USBLibDFUDevice_WinUSB.NTx86] %USB\USBLibDFUDevice.DeviceDesc% =DFU_Install, USB\VID_1CBE&PID_000A&MI_01 [USBLibDFUDevice_WinUSB.NTamd64] %USB\USBLibDFUDevice.DeviceDesc% =DFU_Install, USB\VID_1CBE&PID_000A&MI_01 ; =================== Installation =================== [ClassInstall32] AddReg=AddReg_ClassInstall [AddReg_ClassInstall] HKR,,,,"%DeviceClassDisplayName%" HKR,,Icon,,-1 [DFU_Install.NTx86] Include=winusb.inf Needs=WINUSB.NT CopyFiles=System32_CopyFiles [DFU_Install.NTamd64] Include=winusb.inf Needs=WINUSB.NT CopyFiles=SysWOW64_CopyFiles CopyFiles=System64_CopyFiles [DFU_Install.NTx86.Services] Include=winusb.inf AddService=WinUSB,0x00000002,WinUSB_ServiceInstall [DFU_Install.NTamd64.Services] Include=winusb.inf AddService=WinUSB,0x00000002,WinUSB_ServiceInstall [WinUSB_ServiceInstall] DisplayName = %WinUSB_SvcDesc% ServiceType = 1 StartType = 3 ErrorControl = 1 ServiceBinary = %12%\WinUSB.sys [DFU_Install.NTx86.Wdf] KmdfService=WINUSB, WinDFU_Install [DFU_Install.NTamd64.Wdf] KmdfService=WINUSB, WinDFU_Install [WinDFU_Install] KmdfLibraryVersion=1.9 [DFU_Install.NTx86.HW] AddReg=Dev_AddReg [DFU_Install.NTamd64.HW] AddReg=Dev_AddReg ; NOTE: The following GUID is used by software that accesses USBLib DFU ; devices (dfuprog and LM Flash Programmer). If you want your device to be ; accessible by these tools, don't change it. [Dev_AddReg] HKR,,DeviceInterfaceGUIDs,0x10000,"{D17C772B-AF45-4041-9979-AAFE96BF6398}" [DFU_Install.NTx86.CoInstallers] AddReg=CoInstallers_AddReg CopyFiles=CoInstallers_CopyFiles [DFU_Install.NTamd64.CoInstallers] AddReg=CoInstallers_AddReg CopyFiles=CoInstallers_CopyFiles [CoInstallers_AddReg] HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll" [CoInstallers_CopyFiles] WinUSBCoInstaller2.dll WdfCoInstaller01009.dll [System32_CopyFiles] lmusbdll.dll lmusbdll.lib lmdfu.dll lmdfu.lib [System64_CopyFiles] lmusbdll.dll, lmusbdll64.dll lmusbdll.lib, lmusbdll64.lib lmdfu.dll, lmdfu64.dll lmdfu.lib, lmdfu64.lib [SysWOW64_CopyFiles] lmusbdll.dll lmusbdll.lib lmdfu.dll lmdfu.lib [DestinationDirs] CoInstallers_CopyFiles=11 System32_CopyFiles=10,system32 SysWOW64_CopyFiles=10,syswow64 System64_CopyFiles=10,system32 CoInstallers_CopyFiles=11 ; ================= Source Media Section ===================== [SourceDisksNames] 1 = %DISK_NAME%,,,\i386 2 = %DISK_NAME%,,,\amd64 [SourceDisksFiles.x86] WinUSBCoInstaller2.dll=1 WdfCoInstaller01009.dll=1 lmusbdll.dll=1 lmusbdll.lib=1 lmdfu.dll=1 lmdfu.lib=1 [SourceDisksFiles.amd64] WinUSBCoInstaller2.dll=2 WdfCoInstaller01009.dll=2 lmusbdll.dll=1 lmusbdll.lib=1 lmdfu.dll=1 lmdfu.lib=1 lmusbdll64.dll=2 lmusbdll64.lib=2 lmdfu64.dll=2 lmdfu64.lib=2 ; =================== Strings =================== ; Note: Replace these as appropriate to describe your device. [Strings] ProviderName="Texas Instruments Inc." USB\USBLibDFUDevice.DeviceDesc="TivaWare Device Firmware Upgrade (runtime mode)" WinUSB_SvcDesc="WinUSB" DISK_NAME="TivaWare Install Disk" DeviceClassDisplayName="TivaWare Device Firmware Upgrade (runtime mode)"
Hi Charles
I did have a look at the .inf file, but I am not really an expert in Windows drivers so didnt know if I needed to change anything. The VID and PID I am using is the same as the mouse example. I couldnt see anything in the .inf that indicated what the other interface should be, but then as I said I am not an expert. But I think it must be driver related as I only have to change from using a HID to a CDC and it stops working.
Regards
Jon
Hello Jon,
Charles is right about that piece. The way the boot_demo_usb project is setup is that it uses a joint descriptor for the USB interface which is defined by us as a HID DFU descriptor. The USB drivers we provide are looking for both of those when trying to enumerate.
If you have setup a composite descriptor in your code where one descriptor is for CDC and the other is for DFU, maybe try using USB_PID_DFU for the DFU descriptor.
I don't know anything about Windows drivers either, plus I believe you'd hit the hash issue if you modify them to that extent as well.
Hi Ralph
I will give it a try changing the PID and let you know if it works.
Regards
Jon
Hi Jon,
I looked through a few other related threads to see if there was a way to do this without the driver adjustments but I don't believe there is, so yeah you would need a custom driver unfortunately.