1/1
Error in ISO transfers for the OHCI controller
by Unknown on Oct 5, 2005 |
Not available! | ||
Hello All,
I have been facing an issue with ISO transfers for the OHCI controller.
I am trying to send 2 bytes of data for testing the ISO-OUT feature of the controller through our OHCI driver and have connected an USB speaker to the USB port.
I have filled in values for the ISO-ED and the ISO-TD as follows:
ISO-ED:
Ohci.sys: DumpEDData: ED - DWORD0 = c08901
Ohci.sys: DumpEDData: ED - DWORD1 = 0
Ohci.sys: DumpEDData: ED - DWORD2 = 349f1a0
Ohci.sys: DumpEDData: ED - DWORD3 = 0
ISO-TD:
Ohci.sys: DumpIsoTDData: IsoTD - DWORD0 = e00005
Ohci.sys: DumpIsoTDData: IsoTD - DWORD1 = 34a0000
Ohci.sys: DumpIsoTDData: IsoTD - DWORD2 = 349f200
Ohci.sys: DumpIsoTDData: IsoTD - DWORD3 = 34a0001
Ohci.sys: DumpIsoTDData: IsoTD - DWORD4 = e0000000
Ohci.sys: DumpIsoTDData: IsoTD - DWORD5 = 0
Ohci.sys: DumpIsoTDData: IsoTD - DWORD6 = 0
Ohci.sys: DumpIsoTDData: IsoTD - DWORD7 = 0
The starting frame for the transfer is provided as 5 and the frame count is 0 as we are trying to send 2 bytes of data and the 'MaxEndptPackSize' for the ISO-speaker device is 192.
We are constantly reading the value of the 'HcFmNumber' register and enabling the PLE and the IE bits of the 'HcControl' register only after the contents of the 'HcFmNumber'(frame number) becomes 0.
We have linked the ISO-ED to all the 32 pointers of the 'HccaInterrruptTable' and also we had changed the values of the 'HcPeriodicStart' and the 'HcFrameInterval' registers as 0x1388 and 0x1009 before enabling the PLE and the IE bits of the 'HcControl' register.
The register dump of all the OHCI registers after enabling bits PLE and IE of the 'HcControl register is as follows:
Ohci.sys: OhciEnablePeriodicLists: After enabling schedule...
Ohci.sys: OhciRdWrRegister: HC_REVISION = 0000
Ohci.sys: OhciRdWrRegister: HC_CONTROL = 008c
Ohci.sys: OhciRdWrRegister: HC_COMMAND_STATUS = 0000
Ohci.sys: OhciRdWrRegister: HC_INTERRUPT_STATUS = 0000
Ohci.sys: OhciRdWrRegister: HC_INTERRUPT_ENABLE = 0000
Ohci.sys: OhciRdWrRegister: HC_INTERRUPT_DISABLE = 0000
Ohci.sys: OhciRdWrRegister: HC_HCCA = 349f000
Ohci.sys: OhciRdWrRegister: HC_PERIOD_CURRENT_ED = 0000
Ohci.sys: OhciRdWrRegister: HC_CONTROL_HEAD_ED = 0000
Ohci.sys: OhciRdWrRegister: HC_CONTROL_CURRENT_ED = 0000
Ohci.sys: OhciRdWrRegister: HC_BULK_HEAD_ED = 0000
Ohci.sys: OhciRdWrRegister: HC_BULK_CURRENT_ED = 0000
Ohci.sys: OhciRdWrRegister: HC_DONE_HEAD = 5f0060
Ohci.sys: OhciRdWrRegister: HC_FM_INTERVAL = 10091388
Ohci.sys: OhciRdWrRegister: HC_FM_REMAINING = 0dcc
Ohci.sys: OhciRdWrRegister: HC_FM_NUMBER = 0279
Ohci.sys: OhciRdWrRegister: HC_PERIODIC_START = 1194
Ohci.sys: OhciRdWrRegister: HC_LS_THRESHOLD = 0628
Ohci.sys: OhciRdWrRegister: HC_RH_DESCRIPTOR_A = 2001202
Ohci.sys: OhciRdWrRegister: HC_RH_DESCRIPTOR_B = 0000
Ohci.sys: OhciRdWrRegister: HC_RH_STATUS = 0000
Ohci.sys: OhciRdWrRegister: HC_RH_PORT_STATUS_1 = 10100
Ohci.sys: OhciRdWrRegister: HC_RH_PORT_STATUS_2 = 10103
Here what we are observing is that, we are getting a Condition Code of 0x8(corresponding to DATAOVERRUN) in the ISO-TD after it is getting accessed by the hardware.
This as provided in the OHCI specs is an error due to 'The amount of data returned by the endpoint exceeded either the size of the maximum data packet allowed from the endpoint (found in MaximumPacketSize field of ED) or the remaining buffer size.' as mentioned in section 4.3.3 and which seems to be more relevant to ISO-IN transfers and the fact that we are sending 2 bytes does not comply to this at all.
Can anyone help know the cause of the error? Is something wrong in the way, the ISO-ED or the ISO-TD is filled? or do we need to do more of the bit settings in the OHCI registers for this?
Note that, even though we get a Condition Code of 0x8 in the ISO-TD, we do not see any ISO transfers in the CATC. The ISO-ED and the ISO-TD values after an interval of 10 seconds after PLE and IE enable are as follows:
ISO-ED:
Ohci.sys: DumpEDData: ED - DWORD0 = c08901
Ohci.sys: DumpEDData: ED - DWORD1 = 0
Ohci.sys: DumpEDData: ED - DWORD2 = 0
Ohci.sys: DumpEDData: ED - DWORD3 = 0
ISO-TD:
Ohci.sys: DumpIsoTDData: IsoTD - DWORD0 = 80e00005
Ohci.sys: DumpIsoTDData: IsoTD - DWORD1 = 34a0000
Ohci.sys: DumpIsoTDData: IsoTD - DWORD2 = 349f040
Ohci.sys: DumpIsoTDData: IsoTD - DWORD3 = 34a0001
Ohci.sys: DumpIsoTDData: IsoTD - DWORD4 = e0000000
Ohci.sys: DumpIsoTDData: IsoTD - DWORD5 = 0
Ohci.sys: DumpIsoTDData: IsoTD - DWORD6 = 0
Ohci.sys: DumpIsoTDData: IsoTD - DWORD7 = 0
Is something wrong in the way we are inserting values in the DWORD4 of the ISO-TD?
Can anyone help me in this regard?
Thanking you in advance for the help.
With Regards,
Monisha.
=====
Success is a journey, not a destination.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.opencores.org/pipermail/usb/attachments/20051005/33ae2ae0/attachment-0001.html
|
1/1