3.6.1 CNFG_SetUSBParameters Command
and its Response
The CNFG_SetUSBParameters command (0x81) saves the USB
parameters to NVM:
- wVID → 16-bit Vendor ID in hexadecimal format
- wPID → 16-bit Product ID in hexadecimal format
- bPwrSrc-RmtWup-SNEn → Power
source, remote wake-up, and serial number enumeration setting:
- Bit 3: 0 = bus-powered, 1 = self-powered
- Bit 2: 0 = remote wake-up disabled, 1 = remote wake-up enabled
- Bit 0: 0 = enumerates without a serial number, 1 = enumerates with a serial number
- bMaxCurrent — Maximum bus current:
- 0x01 = 2 mA
- 0x02 = 4 mA
- …
- 0xFA = 500 mA
This command is sent through Endpoint 0x05 (OUT). The response is read through Endpoint 0x85 (IN).
| Byte Index | Command | Description | |
|---|---|---|---|
| 0 |
|
Command code | Saves the device descriptors to NVM |
|
1 2 |
|
VID – Lower Byte VID – Higher Byte | Vendor ID: Factory-default is 0x04D8; it can be modified with a valid range of 0x0000 to 0xFFFF |
|
3 4 |
|
PID – Lower Byte PID – Higher Byte | Product ID: Factory-default is 0x0B15; it can be modified with a valid range of 0x0000 to 0xFFFF |
| 5 |
|
SrcType-RmtWakUp-EnDisSrlNumEnum: BusPow-RWNo-SNEnNo Bus Pow-RWYes-SNEnNo Self Pow-RWNo-SNEnNo SelfPow-RWYes-SNEnNo BusPow-RWNo-SNEnYes BusPow-RWYes-SNEnYes SelfPow-RWNo-SNEnYes SelfPow-RWYes-SNEnYes |
Combines three settings: Bit 3: Bus-powered or self-powered. Bit 2: Wake-Up supported or not. Bit 0: Enumerates with or without a serial number. |
| 6 |
|
Maximum Bus Current: 2 mA 4 mA ... 500 mA | Indicates the maximum current the device draws from the bus.
(in 8-bit hexadecimal format) |
| Byte Index | Response | Description | |
|---|---|---|---|
| 0 | 0x81 | Echo command code | Returns whether the CNFG_SetUSBParameters command
was accepted |
|
1 | 0x20 | Accepted - successful | Command accepted, and the VID and PID are saved to NVM |
0x60 |
Rejected - invalid parameters | Command rejected because the parameters are invalid | |
0x64 |
Rejected - locked | The command is rejected because the device configuration is locked | |
0x90 |
Failure - unsuccessful NVM write | Saving to NVM failed; retry | |
