Author Topic: USB feedback endpoint  (Read 20725 times)

beandigital

  • Member
  • ***
  • Posts: 17
USB feedback endpoint
« 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

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB feedback endpoint
« Reply #1 on: March 01, 2013, 11:35:20 am »
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.
« Last Edit: March 02, 2013, 04:08:48 pm by Jan Axelson »

beandigital

  • Member
  • ***
  • Posts: 17
Re: USB feedback endpoint
« Reply #2 on: March 01, 2013, 12:24:13 pm »
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.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB feedback endpoint
« Reply #3 on: March 01, 2013, 12:54:07 pm »
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.


beandigital

  • Member
  • ***
  • Posts: 17
Re: USB feedback endpoint
« Reply #4 on: March 01, 2013, 01:02:08 pm »
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

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: USB feedback endpoint
« Reply #5 on: March 01, 2013, 04:57:37 pm »
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.

beandigital

  • Member
  • ***
  • Posts: 17
Re: USB feedback endpoint
« Reply #6 on: March 02, 2013, 03:52:32 am »
I see what you are saying, but the FX2LP only allows an endpoint buffer to be either IN or OUT.

Tsuneo

  • Frequent Contributor
  • ****
  • Posts: 145
Re: USB feedback endpoint
« Reply #7 on: March 02, 2013, 09:31:52 am »
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

beandigital

  • Member
  • ***
  • Posts: 17
Re: USB feedback endpoint
« Reply #8 on: March 02, 2013, 12:50:17 pm »
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

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB feedback endpoint
« Reply #9 on: March 02, 2013, 04:08:21 pm »
yes, Tsuneo is correct.

beandigital

  • Member
  • ***
  • Posts: 17
Re: USB feedback endpoint
« Reply #10 on: March 03, 2013, 05:51:57 am »
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.

Tsuneo

  • Frequent Contributor
  • ****
  • Posts: 145
Re: USB feedback endpoint
« Reply #11 on: March 03, 2013, 07:46:09 am »
Quote
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