BQ78350读写dataflash参考文件.pdf

上传者: u010210711 | 上传时间: 2024-01-31 22:35:17 | 文件大小: 185KB | 文件类型: PDF
To write the new Voltage Divider value can be programmed as follows:
- SubclassID for “Voltage Divider” is 104 or 0x68 hex, and offset is 14
- Write 0x00 using BlockDataControl() command (0x61) to enable block data flash control.
(wr 0x61 0x00)
- Write 0x68 (Calibration Subclass) using the DataFlashClass() command (0x3E) to access the
Registers subclass.
(wr 0x3E 0x68)
- Write the block offset location using DataFlashBlock() command (0x3F). To access data located
at offset 0 to 31, use offset = 0x00.
For example, Voltage Divider (offset = 14) is in the first block so use (wr 0x3F 0x00).
- To read the data of a specific offset, use address 0x40 + mod(offset, 32). So to read the old
Voltage divider (rd 0x4E old_Voltage Divider_MSB) (rd 0x4F old_Voltage Divider_LSB)
- To write the data of a specific offset, use address 0x40 + mod(offset, 32). So to write the new
Voltage divider (rd 0x4E new_Voltage Divider_MSB) (rd 0x4F new_Voltage Divider_LSB)
- The data is actually transferred to the data flash when the correct checksum for the whole block
(0x40 to 0x5F) is written to BlockDataChecksum() (0x60).
(wr 0x60 NEW_checksum)
The checksum is (255-x) where x is the 8-bit summation of the BlockData() (0x40 to 0x5F) on a
byte-by-byte basis.
A quick way to calculate the new checksum is to make use of the old checksum:
(a) temp = mod (255 – OLD_checksum – old_Voltage Divider_MSB - old_Voltage Divider_LSB),
256)(b) NEW_checksum = 255 – mod (temp + new_Voltage Divider_MSB + new_Voltage Divider_LSB,
256)
Step 3. Update any individual flash locations, such as serial number, lot code, and date:
In a similar manner to the Voltage divider, any pack specific data such as serial number, lot code and
date can be changed during the production process.

文件下载

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明