- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I use FreeSoC2 Development Board, SparkFun’s take on the PSoC5LP ARM Cortex with two processors onboard: a CY8C5868LTI-LP039 and a CY8C5888AXI-LP096. I want configure USB Full-Speed (USBFS) component as HID Uninterruptable Power Supply Interface (UPS).
I have attached a simply project where i have configure hid descriptor in following mode :
<?xml version="1.0" encoding="utf-16"?>
<HID_Report xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Report_Name="Batteria UPS Test">
<Items>
<HID_Item Type="USAGE_PAGE" Code="4" Size="1" Value="132" Desc="(Power Device)" />
<HID_Item Type="USAGE" Code="8" Size="1" Value="4" Desc="(UPS)" />
<HID_Item Type="COLLECTION" Code="160" Size="1" Value="1" Desc="(Application)" />
<HID_Item Type="USAGE" Code="8" Size="1" Value="31" Desc="(FlowID)" />
<HID_Item Type="COLLECTION" Code="160" Size="1" Value="0" Desc="(Physical)" />
<HID_Item Type="REPORT_ID" Code="132" Size="1" Value="1" Desc="(1)" />
<HID_Item Type="USAGE" Code="8" Size="1" Value="53" Desc="(PercentLoad)" />
<HID_Item Type="USAGE_PAGE" Code="4" Size="1" Value="132" Desc="(Power Device)" />
<HID_Item Type="REPORT_SIZE" Code="116" Size="1" Value="8" Desc="(8)" />
<HID_Item Type="REPORT_COUNT" Code="148" Size="1" Value="3" Desc="(3)" />
<HID_Item Type="LOGICAL_MINIMUM" Code="20" Size="1" Value="0" Desc="(0)" />
<HID_Item Type="LOGICAL_MAXIMUM" Code="36" Size="2" Value="255" Desc="(255)" />
<HID_Item Type="INPUT" Code="128" Size="1" Value="0" Desc="()" />
<HID_Item Type="END_COLLECTION" Code="192" Size="0" Value="0" Desc="" />
<HID_Item Type="END_COLLECTION" Code="192" Size="0" Value="0" Desc="" />
</Items>
</HID_Report>
But when i read the report with Usb control center Cypress's tool i read all zeros. In the firmware i load and enable the specified USB data endpoint for an IN data transfer, in particular i want to send a specifical Percent Load. But it doesn't work. Why?
Thanks in advance for any replies.
Lucia
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have captured USB transfers with WIRESHARK and confirmed that the interrupt in transfers are sent every 0.5sec and its content is alternately changed [00 02 00] and [00 01 01]
It was ensured that the interrupt in transfers are sent as described in the firmware.
Regards,
Noriaki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
Which version of USB control center are you using.
Thanks,
Ankita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I use the following version of USB control center :
Thanks,
Lucia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please check this KBA:
Control Center for HID applications
It says that in order to see such HID transfer data, you need to change the device class to vendor-specific and bind it to CyUSB.sys driver.
CyUSB.sys driver has not been tested with Windows 10.
If you can check with USB log analyzer, that can give more info regarding the issue.
Thanks,
Ankita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your reply, but I don't undestand how to change the device class to vendor-specific and bind it to CyUSB.sys driver. Can you explain how to do this, please?
Thanks,
Lucia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found Microsoft has a tool to capture the USB transactions at following URL.
Capture and view USB traces with Microsoft Message Analyzer - Windows drivers | Microsoft Docs
As the result of capturing it was found interrupt transfers are occurred every 0.5sec.
But I cannot see the TransferData because the data is not available.
Can anyone try to use this tool?
Regards,
Noriaki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have captured USB transfers with WIRESHARK and confirmed that the interrupt in transfers are sent every 0.5sec and its content is alternately changed [00 02 00] and [00 01 01]
It was ensured that the interrupt in transfers are sent as described in the firmware.
Regards,
Noriaki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your replies!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found a problem in your code.
You declared the "REPORT ID" element in the report descriptor. When a "REPORT ID" is contained in the report descriptor, the first byte of the REPORT response must have the "REPORT ID"
Increase UPS_DATA_LEN from 3 to 4
Initialize Ups_Data with four 0s
In the ups_task() store 1 to Ups_Data[0] as the REPORT ID
Store other data to Ups_Data[1] to Ups_Data[3]
There is another solution remove the "REPORT ID" element from the report descriptor. In this case the host request a report with REPORT ID is 0 and the REPORT ID is not required in the response data..
Regards,
Noriaki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you try
while (!(USBFS_1_GetEPState(UPS_ENDPOINT) & USBFS_1_IN_BUFFER_EMPTY)) {}
instead of
while(!USBFS_1_bGetEPAckState(1)){};
?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It still doesn't work . How I can resolve this problem?
Thanks,
Lucia