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).

Table 3-7. CNFG_SetUSBParameters - Command
Byte IndexCommandDescription
0

0x81

Command code

Saves the device descriptors to NVM

1

2

L(wVID)

H(wVID)

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

L(wPID)

H(wPID)

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

0x00

0x04

0x08

0x0C

0x01

0x05

0x09

0x0D

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

0x01

0x02

...

0xFA

Maximum Bus Current:

2 mA

4 mA

...

500 mA

Indicates the maximum current the device draws from the bus.

Parameter value = Maximum bus current/2

(in 8-bit hexadecimal format)

Table 3-8. CNFG_SetUSBParameters- Response
Byte IndexResponseDescription
00x81Echo command codeReturns whether the CNFG_SetUSBParameters command was accepted

1

0x20Accepted - successfulCommand 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