Hi,
still using SDK: PROCESSOR-SDK-RTOS-AM65XX_07_01_00_14.
while adapting the USB-Host example to interface an USB-UART adapter to the AM65xx I have a problem using the USBHostControlTransfer for writing data via control pipe to the device. Reading is working fine. To have some more information I expanded the function with printing out the content of the stages.
At first a successful read:
Setup Stage:
control_trb->bmRequestType = 0xc1
control_trb->bRequest = 16
control_trb->wValue = 0
control_trb->wIndex = 0
control_trb->wLength = 19
control_trb->transfer_len = 8
control_trb->flags = 0x00000841
Data Stage:
normal_trb->bufferlo = 0x701b0708
normal_trb->bufferhi = 0x00000000
normal_trb->transfer_len = 19
normal_trb->flags = 0x00010c01
Status Stage:
normal_trb->bufferlo = 0x00000000
normal_trb->bufferhi = 0x00000000
normal_trb->transfer_len = 0
normal_trb->flags = 0x00001021
Event:
PtrEvent->command_trb_ptr_lo = 0x7009ab60
PtrEvent->command_trb_ptr_hi = 0x00000000
PtrEvent->completioncode = 0x01000000
PtrEvent->trb_slotid = 0x01018001
Command_Completion_Handler. byEventRingIdex=9. xhciData->PtrEvent=0x7009af50
then I try to write configuration data to the device but this failes with compcode 4.
Setup Stage:
control_trb->bmRequestType = 0x41
control_trb->bRequest = 0
control_trb->wValue = 1
control_trb->wIndex = 0
control_trb->wLength = 0
control_trb->transfer_len = 8
control_trb->flags = 0x00000841
Data Stage:
normal_trb->bufferlo = 0x00000000
normal_trb->bufferhi = 0x00000000
normal_trb->transfer_len = 0
normal_trb->flags = 0x00010c01
Status Stage:
normal_trb->bufferlo = 0x00000000
normal_trb->bufferhi = 0x00000000
normal_trb->transfer_len = 0
normal_trb->flags = 0x00001021
Event:
PtrEvent->command_trb_ptr_lo = 0x7009ab90
PtrEvent->command_trb_ptr_hi = 0x00000000
PtrEvent->completioncode = 0x04000000
PtrEvent->trb_slotid = 0x01018001
Command_Completion_Handler. byEventRingIdex=10. xhciData->PtrEvent=0x7009af60
USBHostControlTransfer returns 4
A following read stalls while waiting for the xhci_wait_for_event. This function never returns.
What can cause this behaviour?
Regards,
Stef