Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

SUDPTR

SUDPTR

Anonymous
Not applicable
Question: Can the USB core tell whether or not SUDPTR is pointing to a descriptor.If SUDPTR is pointing to vendor-specific information (instead of a USB defined descriptor)  the second case stated in the TRM as follows  "The USB core transfers the lesser of (a) the bytes requested in the SETUP packet, and (b) the bytes in the length field pointed to by the SUDPTR"  is not applicable.  How is this implemented?  Also how is the entire configuration descriptor (with interface, endpoint descriptors) sent within one request if the SUDPTR is pointing to the configuration descriptor and the first byte in the descriptor states only 9 bytes.

 

Answer:

This is implemented in the core and the core  does know if the data being sent is a descriptor or  raw data from RAM (vendor request).  The USB core checks the bRequestType bits  and parses the request to determine whether it is a vendor or Get_descriptor ( and also what type of Get_descriptor the SUDPTR is pointing to)  request.  Once it has determine the type of data the SUDPTR is pointing to the data is sent accordingly.  

For a Get_config descriptor the  data is send twice once with the Config descriptor  only (9 bytes) and next time the whole descriptor along with all the endpoint, interface descriptors.

For a vendor request the data that is requested in the SETUP packet is sent over the USB.


0 Likes
150 Views
Contributors