3.3 HCI_EEPROM_WRITE Command and Event

Use the HCI_EEPROM_WRITE command to write data into the EEPROM location specified by the Start_Address parameter. The OCF is 0x27 and the HCI OpCode is 0xFC27.

  • Start_Address – Indicates the start address of the EEPROM record and takes 2 bytes
  • Length – Indicates the write length of the EEPROM record and takes 1 byte (approximately ranging from 1 to 240)
  • Data – Indicates the data of the EEPROM record and takes Length bytes
Table 3-5. HCI_EEPROM_Write Command

Command

OCF

Command Parameters

Return Parameters

HCI_EEPROM_WRITE

0x27

Start_Address, Length and Data

Status

Use the HCI_EEPROM_Write command to write the data into EEPROM.

Start_Address

Size – 2 bytes

Value

Parameter Description

0xXXXX

Start writing address

Length

Size – 1 byte

Value

Parameter Description

N

Length of the data written into EEPROM

N: 1-240

Data

Size – N byte

Value

Parameter Description

N bytes of the data written to EEPROM

N: 1-240

Status

Size – 1 byte

Value

Parameter Description

0x00

HCI_EEPROM_Write command succeeded

0x01-0xFFHCI_EEPROM_Write command failed
  • Example data – HCI_EEPROM_WRITE command
    • 0x01 – HCI command packet
    • 0x27 0xFC – OpCode 0xFC27 is sent in a little endian as 0x27 0xFC
    • 0x06 – The parameter length of the HCI command
    • 0x00 0x07 – Start_Address of the EEPROM record
    • 0x03 – Write the length of the EEPROM record
    • 0x04 0x04 0x24 – The data of the EEPROM record
    Figure 3-7. Example of HCI_EEPROM_WRITE Command
  • Example data – Event to HCI_EEPROM_WRITE command
    • 0x04 – HCI event packet
    • 0x0E – Command complete event of HCI event
    • 0x04 – Total 4 bytes of parameter appended
    • 0x01 0x27 0xFC – The processed HCI command
    • 0x00 – Indicate a success
    Figure 3-8. Event of HCI_EEPROM_WRITE Command