Tool/software: Code Composer Studio
In our design I am using the pins PB0 (USBID) and PB1 (VBUS) for a second CAN bus. The VBUS signal is therefore monitored on another GPIO pin. The USB interface is only used in Mass storage device class (USB stick).
How do I config the USB driver to manually to be able to control the USBPEN and USBFLT pins?
I have modified the usb_host_msc example with no success.
My Initialization Code:
void Init_USB(void)
{
uint32_t ui32PLLRate;
g_eState = STATE_NO_DEVICE;
g_eUIState = STATE_NO_DEVICE;
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UDMA);
ROM_uDMAEnable();
ROM_uDMAControlBaseSet(g_sDMAControlTable);
USBStackModeSet(0, eUSBModeHost, 0);
USBHCDRegisterDrivers(0, g_ppHostClassDrivers, g_ui32NumHostClassDrivers);
g_psMSCInstance = USBHMSCDriveOpen(0, MSCCallback); // Open an instance of the mass storage class driver.
USBHCDPowerConfigInit(0, USBHCD_VBUS_MANUAL | USBHCD_FAULT_VBUS_NONE);
SysCtlVCOGet(SYSCTL_XTAL_25MHZ, &ui32PLLRate);
USBHCDFeatureSet(0, USBLIB_FEATURE_CPUCLK, &ui32SysClock);
USBHCDFeatureSet(0, USBLIB_FEATURE_USBPLL, &ui32PLLRate);
USBHCDInit(0, g_pHCDPool, HCD_MEMORY_SIZE); // Initialize the USB controller for host operation.
MAP_USBHostPwrEnable(USB0_BASE); // Apply USB Power
f_mount(0, &g_sFatFs); // Initialize the file system.
eStateCopy = g_eUIState;
}
Anybody who know about a working example?
Best Regards
Henning