Hi, my SK-S7G2 acts as a USB Host HID that will send and receive raw reports to and from a HID Device. I'm running SSP 1.3.0.
When the software calls ux_host_class_hid_report_set(), the routine returns error code 0x79.
If I single-steped the routine, I found that
the function failed after the _ux_host_stack_transfer_request() with error code 33 (UX_TRANSFER_STALLED?)
The USB Notify callback function looks like this.
status = _ux_utility_memory_compare ( _ux_system_host_class_hid_name, host_class,_ux_utility_string_length_get (_ux_system_host_class_hid_name));
if(UX_SUCCESS == status)
{
switch(event)
{
case UX_DEVICE_INSERTION:
g_hid = instance;
while(g_hid->ux_host_class_hid_state != (ULONG)UX_HOST_CLASS_INSTANCE_LIVE)
{
tx_thread_sleep(1);
}
break;
case UX_DEVICE_REMOVAL:
// do nothing
break;
default:
/* Ignore others */
break;
}
}
The function to send the report is shown below. I followed the example
in the r11um0008eu0571_synergy_usbx_host.pdf, page 83 to setup the report and call ux_host_class_hid_report_set() routine.
The document does not describe what the report.ux_host_class_hid_client_report should be. My setup
could be wrong.
int hid_send(UX_HOST_CLASS_HID *g_hid)
{
UX_HOST_CLASS_HID_CLIENT_REPORT report;
UX_HOST_CLASS_HID_REPORT hid_report;
UINT status;
int i;
uint8_t cmd[16];
if(g_hid == NULL)
{
return 0;
}
hid_report.ux_host_class_hid_report_type = UX_HOST_CLASS_HID_REPORT_TYPE_FEATURE;
hid_report.ux_host_class_hid_report_byte_length = 16;
hid_report.ux_host_class_hid_report_id = 0;
memset(cmd, 0, sizeof(uint8_t) * 16);
cmd[0] = CMD_READ_ALL;
report.ux_host_class_hid_client_report = &hid_report;
report.ux_host_class_hid_client_report_buffer = cmd;
report.ux_host_class_hid_client_report_length = 16;
report.ux_host_class_hid_client_report_flags = UX_HOST_CLASS_HID_REPORT_RAW;
status = ux_host_class_hid_report_set(g_hid, &report);
if(status == UX_SUCCESS)
:
Any ideas on suggestion on what I did wrong or I could try to fix the problem are appreciated.
Thank you!