- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I follow Adding Communication Device Class Interface to FX3 Firmware - KBA229099. and added all the codes into cyfxslfifousbdscr.c and cyfxslfifosync.c. When i try it out at my host-PC, windows 10 device manager can detect the cypress bootloader but the USB-Serial-device did not show up in device-manager-other device.
i am using the example from SlaveFifoSync.rar in https://community.infineon.com/t5/Knowledge-Base-Articles/Adding-Communication-Device-Class-Interfac...
do i need to add the codebelow from https://community.infineon.com/t5/Resource-Library/SlaveFiFoSync-example-with-a-CDC-debug-console/ta..., into cyfxslfifosync.c
void SwitchConsoles(void)
{
CyU3PReturnStatus_t Status;
// Only proceed if USB connection is up
if (glIsApplicationActive)
{
// Tear down DMA channels that need to be reassigned
CyU3PDmaChannelDestroy(&CDCtoCPU_Handle);
// Switch console
UsingUARTConsole = !UsingUARTConsole;
CyU3PDebugPrint(4, "Switching console to %s", UsingUARTConsole ? "UART" : "USB");
CyU3PThreadSleep(100); // Delay to allow message to get to the user
// Disconnect the current console
CyU3PDebugDeInit();
CyU3PThreadSleep(100); // Delay to allow Debug thread to complete and all buffers returned
// Connect up the new Console out - this is simpler than the I2C case since the USB socket is an infinite sink
Status = CyU3PDebugInit(UsingUARTConsole ? CY_U3P_LPP_SOCKET_UART_CONS : CY_FX_EP_CONSUMER_CDC_SOCKET, 8);
CheckStatus("DebugInit", Status);
CyU3PDebugPreamble(CyFalse); // Skip preamble, debug info is targeted for a person
// Say hello on the new console
CyU3PDebugPrint(4, "Console is now %s", UsingUARTConsole ? "UART" : "USB" );
// Now connect up Console In
Status = InitializeDebugConsoleIn(UsingUARTConsole);
CheckStatus("InitializeDebugConsoleIn", Status);
// Connect CDC_Loopback if necessary
}
else CyU3PDebugPrint(4, "USB not active, cannot switch consoles\n");
}
CyU3PReturnStatus_t InitializeDebugConsoleIn(CyBool_t UsingUART)
{
CyU3PDebugPrint(4, "\nSetting up USB_CDC Console In");
CyU3PMemSet((uint8_t *)&dmaConfig, 0, sizeof(dmaConfig));
dmaConfig.size = EpSize[CyU3PUsbGetSpeed()];
dmaConfig.count = 2;
dmaConfig.prodSckId = CY_FX_EP_PRODUCER_CDC_SOCKET;
dmaConfig.consSckId = CY_U3P_CPU_SOCKET_CONS;
dmaConfig.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaConfig.notification = CY_U3P_DMA_CB_PROD_EVENT;
dmaConfig.cb = CDC_CharsReceived;
Status = CyU3PDmaChannelCreate(&CDCtoCPU_Handle, CY_U3P_DMA_TYPE_MANUAL_IN, &dmaConfig);
CheckStatus("CreateCDC_ConsoleInDmaChannel", Status);
if (Status != CY_U3P_SUCCESS) CyU3PDmaChannelDestroy(&CDCtoCPU_Handle);
else
{
Status = CyU3PDmaChannelSetXfer(&CDCtoCPU_Handle, 0);
CheckStatus("ConsoleInEnabled", Status);
}
}
return Status;
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AliAsgar,
Issue is solved, the usb serial port finally appear in device manager. I found out that i did not put #define cdc in cyfxslfifosync.h, that is why the compiler did not compile the cdc codes.
regards, jkhoo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you try uninstalling the device "Cypress USB StreamerExample Device" coming up in the device manager when FX3 is programmed using the firmware attached in the KBA? Did this solve the device manager issue?
The firmware attached works as a USB UART example with slave FIFO interface, not for debugging. Please let us know what is the usage of the CDC interface.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I try uninstalling the device per your advise but i still cannot see the CDC USB-serial in device manager at Ports (COM & LPT).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
After uninstalling the device, restart the device and program the firmware. Please share the snippets of USB Serial Bus controllers, Ports and Other devices from the device manager.
Are you using the firmware given in the KBA229099 without any changes?
Please let us know what is the usage of the CDC interface in your application.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AliAsgar,
Issue is solved, the usb serial port finally appear in device manager. I found out that i did not put #define cdc in cyfxslfifosync.h, that is why the compiler did not compile the cdc codes.
regards, jkhoo