Author Topic: where can i get any Token Packet  (Read 13603 times)

eng.Buffon

  • Member
  • ***
  • Posts: 23
where can i get any Token Packet
« on: March 01, 2012, 05:08:50 am »
hi everyone

any transaction in the USB bus divide into three packets the first one is token packet

when the token packet's PID is Setup we receive it on the endpoint 0

but When the token packet's PID is anything other than Setup ... (e.g. OUT Transaction). on which endpoint i can get this token packet to analysis it?

Pat Crowe

  • Member
  • ***
  • Posts: 39
Re: where can i get any Token Packet
« Reply #1 on: March 01, 2012, 06:10:45 am »
If you are trying to analyse it by capturing it on the bus between the host and device then you just examine the endpoint field to see which endpoint is specified.

If you are inside the device you will never see the token packet at all, unless you have instructed the SIE to be ready to accept a transaction on any endpoint which is likely to be used. These are, of course, the endpoints defined in your descriptors.

To be more accurate in your original statements:
- A transaction can have between 2 and 4 packets.
- If specified correctly a SETUP can appear on any endpoint, because any endpoint can be used for control transfer. (Though it is not common.)