EPROM STATUS MEMORY
In addition to the programmable 1024-bits of memory are 64 bits of status information contained in the EPROM STATUS memory. The STATUS memory is accessible with separate commands. The STATUS bits are EPROM and are read or programmed to indicate various conditions to the software interrogating the bq2022A. The first byte of the STATUS memory contains the write protect page bits, that inhibit programming of the corresponding page in the 1024-bit main memory area if the appropriate write-protection bit is programmed. Once a bit has been programmed in the write protect page byte, the entire 32-byte page that corresponds to that bit can no longer be altered but may still be read. The write protect bits may be cleared by using the WRITE STATUS command.
除了128字节的可编程存储器,还有8个字节包含状态信息的EPROM STATUS存储器。STATUS存储器通过单独的命令访问。STATUS存储器被用来指示软件同bq2022A交互的不同情况。STATUS存储器的第一个字节包含写保护页位,达到禁止编程128字节可编程存储器相应页的目的。如果写保护页字节中的相应位被编程,相应的32-字节页将不可被编程但是可以读取。写保护页字节可以通过写状态命令清除。
The next four bytes of the EPROM STATUS memory contain the page address redirection bytes. Bits in the EPROM status bytes can indicate to the host what page is substituted for the page by the appropriate redirection byte. The hardware of the bq2022A makes no decisions based on the contents of the page address redirection bytes. This feature allows the user‘s software to make a data patch to the EPROM by indicating that a particular page or pages should be replaced with those indicated in the page address redirection bytes. The ones complement of the new page address is written into the page address redirection byte that corresponds to the original (replaced) page. If a page address redirection byte has an FFh value, the data in the main memory that corresponds to that page are valid. If a page address redirection byte has some other hex value, the data in the page corresponding to that redirection byte are invalid, and the valid data can now be found at the ones complement of the page address indicated by the hexadecimal value stored in the associated page address redirection byte. A value of FDh in the redirection byte for page 1, for example, indicates that the updated data are now in page 2. The details for reading and programming the EPROM status memory portion of the bq2022A are given in the Memory Function Commands section.
EPROM STATUS存储器接下来的四个字节是页地址重定向字节。用来指示哪些页被重定向字节中的所指的页代替。bq2022A硬件不基于页地址重定向字节中的内容做任何决定(bq2022A的硬件无法决定页地址重定向字节的内容)。这个特性是方便用户软件建立一个EPROM"数据补丁",只需指明某特殊页由页地址重定向字节中指向的页所替代。需将新地址的反码写到对应原始(被替换)页的页地址重定向字节中。如果页地址重定向字节中的值是FFh,表示相应的主存储器页中的数据是有效的。如果页地址重定向字节中的值不是FFh,说明相应存储器页中的数据是无效的,并且有效的数据可以在其重定向字节中十六进制值的反码所指示的页地址对应的存储器中找到。例如在页1重定向字节中的十六进制值是FDh,表示被更新的数据在页2。关于bq2022A的EPROM读取和编程部分的详细介绍请参见存储器功能命令章节。
原文:http://www.cnblogs.com/tamarind/p/4905615.html