- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using CY8CKIT-059 and am attempting to get the USBUART working - preferably including powering the device.
However, in the example code, there is a wait for " USBUART_GetConfiguration() that will wait until that returns a non zero value. It always returns 0.
I've tried the examples, I've verified my clocks.. Code compiles, and programs no problem.
I've got a regular TTL UART working, but I'd much rather use the USB uart so I can have just the one cable running to this module for power and communications...
FYI This doesn't appear to be a windows device issue - it doesn't enumerate because it is stuck in that loop of GetConfiguration.
I've also tried it on two seperate CY8CKit's...
*snip*
int main ()
CyGlobalIntEnable;
/* Start USBFS operation with 5-V operation. */
USBUART_Start(USBFS_DEVICE, USBUART_5V_OPERATION);
for(;;)
{
/* Host can send double SET_INTERFACE request. */
if (0u != USBUART_IsConfigurationChanged()) // THIS ALWAYS RETURNS 0
{
/* Initialize IN endpoints when device is configured. */
if (0u != USBUART_GetConfiguration()) // THIS ALSO ALWAYS RETURNS 0
{
/* Enumeration is done, enable OUT endpoint to receive data
* from host. */
USBUART_CDC_Init();
}
}
*snip
I can get by using an external TTL to USB Serial adapter, but that kinda defeats the purpose Any help would be greatly appreciated..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yikes..
Thanks for the input.... As it turns out - was as simple as a bad cable.... Turns out I was using a USB-Micro cable that only provided power, and no data lines.. Lesson learned.
Thanks for your input anyways!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
james,
You can still use a single cable for UART communication with PC and powering KIT-059, if used pins 12_6 and 12_7 for RX and TX, which are hard-wired to USB-UART converter located in KitProg. Once KIT-059 is programmed, you will find additional COM port in Device Manager.
To check USBUART issue, please post project bundle here: 1. Build->Clean. 2. File->Create Archive bundle->minimal. 3. Delete Generated_source folder inside archive to save space.
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yikes..
Thanks for the input.... As it turns out - was as simple as a bad cable.... Turns out I was using a USB-Micro cable that only provided power, and no data lines.. Lesson learned.
Thanks for your input anyways!