USB Configuration¶
Due to the nature of the USB enumeration process, USB setup must be done using a Data Partition so that the configuration is complete prior to enumeration. The following table summarises the USB interface parameters which can be configured.
Command |
Ty pe |
A rguments |
Definition |
---|---|---|---|
SET_USB_VENDOR_ID GET_USB_VENDOR_ID |
ui nt 32 |
1 |
Set USB Vendor ID. See notes A, B. |
S ET_USB_PRODUCT_ID G ET_USB_PRODUCT_ID |
ui nt 32 |
1 |
Set USB Product ID. See notes A, B. |
S ET_USB_BCD_DEVICE G ET_USB_BCD_DEVICE |
ui nt 32 |
1 |
Set USB Device Release Number (bcdDevice). See notes A, B. |
SET_USB _VENDOR_STRING GET_USB _VENDOR_STRING |
u in t8 |
25 |
Set USB Vendor string. See notes A, B. |
SET_U SB_PRODUCT_STRING GET_U SB_PRODUCT_STRING |
u in t8 |
25 |
Set USB Product string. See notes A, B. |
SET_USB _SERIAL_NUMBER GET_USB _SERIAL_NUMBER |
ui nt 32 |
1 |
Write only register, setting the behaviour of iSerialNumber field in USB descriptor (See notes A, B.): 1 - Load from Flash Serial Number 0 - Default to 0 . |
SET_U SB_TO_DEVICE_RATE GET_U SB_TO_DEVICE_RATE |
ui nt 32 |
1 |
Set sampling frequency of USB reference from USB host. Default is 48000 samples/sec. See notes A, B. |
SET_D EVICE_TO_USB_RATE GET_D EVICE_TO_USB_RATE |
ui nt 32 |
1 |
Set sampling frequency of audio output to USB host. Default device_to_usb_rate is 48000 samples/sec. See notes A, B. |
SET_USB_TO _DEVICE_BIT_RES GET_USB_TO _DEVICE_BIT_RES |
ui nt 32 |
1 |
Set bit depth of USB reference from USB host. Default usb_to_device_bit_res is 16 bits. See notes A, B. |
SET_DEVI CE_TO_USB_BIT_RES GET_DEVI CE_TO_USB_BIT_RES |
ui nt 32 |
1 |
Set bit depth of audio output to USB host. Default device_to_usb_bit_res is 16 bits. See notes A, B. |
SET _USB_START_STATUS GET _USB_START_STATUS |
u in t8 |
1 |
Start USB. Set as 1 as the last USB item in Data Partition. See notes A. |
A: Command supported for Data Partition use only
B: Command must occur before SET_USB_START_STATUS 1