3.4 HCI_EEPROM_READ Command and Event
Use the HCI_EEPROM_READ
command to read back the data from the EEPROM location
specified by the Start_Address
parameter. The OCF is 0x29 and the HCI
OpCode is 0xFC29. To verify, use the HCI_EEPROM_READ
command to read
back the EEPROM record after a HCI_EEPROM_WRITE
command.
Start_Address
– Indicates the start address of the EEPROM record and takes 2 bytes- Length – Indicates the read length of the EEPROM record and takes 1 byte (approximately ranging from 1-240)
Data is returned in the command complete event:
- Status – Indicates the operation status and takes 1 byte
Start_Address
– Indicates the start address of the EEPROM record and takes 2 bytes- Length – Indicates the length of the EEPROM record and takes 1 byte (approximately ranging from 1-240)
- Data – Indicates the data of the EEPROM record and takes Length bytes
Command |
OCF |
Command Parameters |
Return Parameters |
---|---|---|---|
| 0x29 |
| Status, |
Use the | |||
| Size – 2 bytes | ||
Value | Parameter Description | ||
0xXXXX | Start reading address | ||
Length | Size – 1 byte | ||
Value | Parameter Description | ||
N | Indicates the length of the data to read (in bytes) from EEPROM. N: 1-240 | ||
Status | Size – 1 byte | ||
Value | Parameter Description | ||
0x00 |
| ||
0x01-0xFF |
| ||
| Size – 2 bytes | ||
Value | Parameter Description | ||
0xXXXX | Start reading address | ||
Length | Size – 1 byte | ||
Data | Size – N bytes | ||
Value | Parameter Description | ||
N bytes of data read from EEPROM |
- Example data –
HCI_EEPROM_READ
Command- 0x01 – HCI command packet
- 0x29 0xFC – OpCode 0xFC29 is sent in a little endian as 0x29 0xFC
- 0x03 – The parameter length of the HCI command
- 0x00 0x07 – Start_Address of the E2PROM record
- 0x03 – Read back the length of the EEPROM record
- Example data – Event to
HCI_EEPROM_ READ
command- 0x04 – HCI event packet
- 0x0E – Command complete event of the HCI event
- 0x0A – Total 10 bytes of parameter appended
- 0x01 0x29 0xFC – The processed HCI command
- 0x00 – Indicate a success
- 0x00 0x07 –
Start_Address
of the EEPROM record - 0x03 – Read back the length of the EEPROM record
- 0x04 0x04 0x24 – Read back data of the EEPROM record