PORTS Forum
Ports and Interfaces => USB => Topic started by: beandigital on March 01, 2013, 11:12:35 am
-
I am a bit confused by the feedback endpoint. If I have a data OUT endpoint (0x02) can I have a feedback IN endpoint of (0x86)? I have read that the feedback endpoint has to follow the data endpoint. SO should it be (0x83)?
Thanks
Jon
-
If you can point to where you read that the feedback endpoint has to follow the data endpoint, we may be able to explain what is meant by it.
-
I was reading the USB 2.0 spec page 272. I am not sure if I am reading it correctly as it talks about feedback endpoints for multiple data channels.
A feedback endpoint (explicit or implicit) needs to be associated with one (or more) isochronous data
endpoints to which it provides feedback service. The association is based on endpoint number matching. A
feedback endpoint always has the opposite direction from the data endpoint(s) it services. If multiple data
endpoints are to be serviced by the same feedback endpoint, the data endpoints must have ascending
ordered–but not necessarily consecutive–endpoint numbers. The first data endpoint and the feedback
endpoint must have the same endpoint number (and opposite direction). This ensures that a data endpoint
can uniquely identify its feedback endpoint by searching for the first feedback endpoint that has an endpoint
number equal or less than its own endpoint number.
-
OK, yes:
Multiple endpoints with the same feedback endpoint must have ascending ordered–but not necessarily consecutive–endpoint numbers.
And the first data endpoint and the feedback endpoint must have the same endpoint number (and opposite direction).
So if the first data endpoint is 0x02, the feedback endpoint must be 0x82.
-
Thanks for the reply. But I am a bit confused as how can I have an endpoint that is IN and OUT. The micro I am using (Cypress FX2LP) only allows an endpoint to be IN or OUT.
Jon
-
You have 2 endpoints, one IN (0x82) and one OUT (0x2). An endpoint is defined by direction *AND* number. So the IN endpoint is different from the out endpoint of the same number.
-
I see what you are saying, but the FX2LP only allows an endpoint buffer to be either IN or OUT.
-
Cypress EZ-USB FX2LP is not a good chip to make a feedback endpoint.
Its endpoint numbering and supported transfer types are fixed as follows.
EP1 (IN and OUT) - bulk or interrupt
EP2, 4, 6, 8 (IN or OUT) - bulk, interrupt or isoc
Just the EP1 is paired, but it doesn't support isoc.
I recommend you to move to other MCU.
There are a couple of low-cost HS USB MCUs, STM32F2/STM32F4 (with HS ULPI PHY), LPC182x/3x/5x, etc.
These MCUs also support these hardware features, better for USB audio implementation.
- SOF recovery
- Hardware SOF trigger
Tsuneo
-
Tsuneo
Are you saying that it is impossible to implement a feedback endpoint with the FX2LP, as I was not aware of this limitation. Are you saying that a feedback endpoint must have the same number as the data endpoint?
Thanks
Jon
-
yes, Tsuneo is correct.
-
Ok thanks. I will need to contact Cypress to see if there is an alternative as I need a USB controller that can interface to an FPGA.
-
I will need to contact Cypress
Cypress will suggest EZ-USB FX3. I agree it's an easy way for you, because slave FIFO/ GPIF work like FX2.
You may connect above MCUs to a FPGA over external memory interface (FSMC/EMC). But a dual-port RAM should be placed between the MCU and FPGA, because both take bus master.
Tsuneo