Author Topic: "bulk only" protocol - CBW and CSW alignment ?  (Read 6951 times)

erdmann

  • Member
  • ***
  • Posts: 43
"bulk only" protocol - CBW and CSW alignment ?
« on: June 18, 2015, 07:57:37 am »
The "bulk only spec" states this for CBW and also CSW:
"The CBW shall start on a packet boundary"
"The CSW shall start on a packet boundary"
"Fields appear aligned to byte offsets equal to a multiple of their byte size."

Does this mean the CBW and CSW has to be 4-byte aligned in memory (considering the fact that both structures start with 4-byte length signature fields) ? I don't really see what a "packet boundary" is supposed to mean.

I wonder if data alignment has any repercussion on how the host controller actually sends out this data on the very lowest protocol level ...


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: "bulk only" protocol - CBW and CSW alignment ?
« Reply #1 on: June 18, 2015, 10:35:18 am »
I believe "packet boundary" just means that the host shouldn't fill out an otherwise short packet (transaction) with the start of a new CBW or CSW. In other words, make the previous packet a short packet if necessary and start a new packet with the CBW or CSW.

The bulk only spec defines the starting locations for the field in a CBW or CSW.

So as I see it, "Fields appear aligned to byte offsets equal to a multiple of their byte size." is just describing the structures specified for the CBW and CSW.

erdmann

  • Member
  • ***
  • Posts: 43
Re: "bulk only" protocol - CBW and CSW alignment ?
« Reply #2 on: June 18, 2015, 12:30:01 pm »
Ok. Thanks.