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
|
Command |
OCF |
Command Parameters |
Return Parameters |
|---|---|---|---|
|
|
0x27 |
|
Status |
|
Use the | |||
|
|
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 |
| ||
| 0x01-0xFF | HCI_EEPROM_Write command failed | ||
- Example data –
HCI_EEPROM_WRITEcommand- 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_Addressof 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_WRITECommand - Example data – Event to
HCI_EEPROM_WRITEcommand- 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_WRITECommand
