ba34z100g1

BQ34z100-G1

電池残量計モニタ.

以下データシートDeepL翻訳

このビットは、内部または外部バッテリ電圧分圧器の使用を選択します。内部分割器はシングルセルでのみ使用します。デフォルトは0です。

このデバイスは、1 シリーズ Li-Ion セルのデフォルトの場合の工場出荷時の構成で出荷されます。 これは、Pack Configuration レジスタの VOLTSEL ビットを設定したり、データ フラッシュ構成セクションの直列セル数を設定したりすることで変更できます。 電圧が65535mVまでのマルチセル・アプリケーションでは、適切な入力スケーリング抵抗を使用して、すべての条件の下で最大バッテリ電圧がBAT入力で約900mVと表示されるようにして、電圧を測定することができます。 実際の利得関数は、較正プロセスによって決定され、その結果として得られる 電圧較正係数は、データ フラッシュの場所の分圧器に保存されます。 シングルセルアプリケーションの場合、外部分圧器ネットワークは必要ありません。IC 内部、BAT ピンの後ろ は公称5:1の分圧器で、上側の脚部に88KΩ、下側の脚部に22KΩの分圧器です。この内部分圧器 は、パック・コンフィギュレーション・レジスタのVOLTSELビットをクリアすることで有効になります。 この比率が最適です。は、充電電圧が 4.5 V に制限されている単一のリチウムイオン電池を直接測定するためのものです。 高電圧のアプリケーションでは、本書の参照設計に従って、外部抵抗分圧ネットワークを実装する必要があります。 分周抵抗の品質は、時間と温度による測定誤差を避けるために非常に重要です。温度係数が25ppmの0.1%抵抗を使用することをお勧めします。また、各素子の形状が類似しているため、温度と経年変化による分圧比の変化を追跡するマッチドネットワークを使用することもできます。直列抵抗の計算は、以下の式に従って行うことができます。 Vin max mV を超えると、直線性が低下した測定となります。

分周抵抗の下肢は、16.5KΩを使用して、15KΩ~25Kの範囲にする必要があります。Rseries = 16500 Ω (Vin max mV - 900 mV)/900 mV すべてのアプリケーションでは、データフラッシュの分圧値はファームウェアによって 合計デバイダ比を指定します。 このパラメータの公称値は、スタック電圧の最大期待値です。 較正ルーチンは、報告された電圧が実際に印加された電圧と等しくなるように値を調整します。

すべてのアプリケーションでは、データ・フラッシュ内の分圧器の値は、ファームウェアによって総分圧比を較正するために使用されます。このパラメータの公称値は、スタック電圧の最大期待値です。較正ルーチンは、報告された電圧が実際の印加電圧と等しくなるように値を調整します。

マルチセルの場合、ハードウェア構成が異なります。外部分圧ネットワークは を上記のRseriesの式を用いて計算します。仕切板の下脚は、15KΩの範囲内にあることが好ましい。を25KΩにしました。

The bq34z100-G1 uses a series of 2-byte standard commands to enable host reading and writing of battery information.
bq34z100-G1は、一連の2バイト標準コマンドを使用して、ホストがバッテリー情報の読み書きを可能にします。
Each standard command has an associated command-code pair, as indicated in Table 2-1.
各標準コマンドには、表 2-1 に示すように、関連するコマンドコードのペアがあります。
Because each command consists of two bytes of data, two consecutive HDQ/I2C transmissions must be executed to initiate the command function and to read or write the corresponding two bytes of data.
各コマンドは2バイトのデータで構成されているため、コマンド機能を開始し、対応する2バイトのデータを読み書きするためには、2回連続してHDQ/I2C送信を実行する必要があります。
Standard commands are accessible in NORMAL operation. Also, two block commands are available to read Manufacturer Name and Device Chemistry. Read/Write permissions depend on the active access mode.

Issuing a Control() command requires a subsequent two-byte subcommand. These additional bytes specify the particular control function desired.
Control()コマンドを発行するには、それに続く2バイトのサブコマンドが必要です。
The Control() command allows the host to control specific features of the bq34z100-G1 during normal operation, and additional features when the bq34z100-G1 is in different access modes, as described in Table 2-2
これらの追加バイトは は、必要な特定の制御機能を指定します。Control() コマンドにより、ホストは特定の 通常動作時のbq34z100-G1の機能と、bq34z100-G1の状態での追加機能を示します。表2-2に記載されているように、異なるアクセスモードがあります。

2.1.1.1 CONTROL_STATUS: 0x0000

Instructs the fuel gauge to return status information to Control addresses 0x00/0x01.
コントロール・アドレス 0x00/0x01 にステータス情報を返すように燃料計に指示します。
The status word includes the following information.
ステータスワード には以下の情報が含まれています。

Extended commands offer additional functionality beyond the standard set of commands. They are used in the same manner; however, unlike standard commands, extended commands are not limited to 2-byte words. The number of command bytes for a given extended command ranges in size from single to multiple bytes, as specified in Table 2-8. For details on the SEALED and UNSEALED states, refer to Section 2.2.33.3.

拡張コマンドは、標準のコマンドセットを超える追加機能を提供します。 これらのコマンドは同じように使用されるが、標準コマンドとは異なり、拡張コマンドは 2 バイトのワードに限定されない。与えられた拡張コマンドのコマンドバイト数は、表 2-8 で指定されているように、1 バイトから複数バイトまでの範囲で設定されています。SEALED と UNSEALED の状態については、2.2.33.3 節を参照のこと。

i2cの標準コマンドのようにメモリリードで読めそう.

UNSEALED Access: This command sets the data flash class to be accessed. The class to be accessed should be entered in hexadecimal.
UNSEALED アクセス。このコマンドは、アクセスするデータ・フラッシュ・クラスを設定します。アクセスするクラスは16進数で入力してください。
SEALED Access: This command is not available in SEALED mode.
SEALED アクセス。このコマンドは SEALED モードでは使用できません。

UNSEALED Access: If BlockDataControl has been set to 0x00, this command directs which data flash block will be accessed by the BlockData() command. Writing a 0x00 to DataFlashBlock() specifies the BlockData() command will transfer authentication data. Issuing a 0x01 instructs the BlockData() command to transfer Manufacturer Data.
UNSEALED アクセス。BlockDataControl が 0x00 に設定されている場合、このコマンドはどのデータ・フラッシュを転送するかを指示します。ブロックにアクセスするには、BlockData() コマンドを使用します。DataFlashBlock() に 0x00 を書き込むことで BlockData()コマンドは認証データを転送します。0x01 を発行すると、BlockData() コマンドに をクリックしてメーカーデータを転送してください。
SEALED Access: This command directs which data flash block will be accessed by the BlockData() command. Writing a 0x00 to DataFlashBlock() specifies that the BlockData() command will transfer authentication data. Issuing a 0x01 instructs the BlockData() command to transfer Manufacturer Data.
SEALED アクセス。このコマンドは、BlockData() がどのデータ・フラッシュ・ブロックにアクセスするかを指定します。コマンドを使用します。DataFlashBlock() に 0x00 を書き込むと、BlockData() コマンドが 認証データを転送します。0x01 を発行すると、BlockData() コマンドはメーカーデータを転送するように指示します。

UNSEALED Access: This command is used to control data flash ACCESS mode. Writing 0x00 to this command enables BlockData() to access general data flash. Writing a 0x01 to this command enables the SEALED mode operation of DataFlashBlock().
UNSEALED アクセス。このコマンドは、データ・フラッシュのACCESSモードを制御するために使用します。このコマンドに 0x00 を書き込むと、BlockData() は一般的なデータ・フラッシュにアクセスできます。このコマンドに 0x01 を書き込むと、DataFlashBlock() の SEALED モード動作が有効になります。

2.2.33.1 Accessing Data Flash

The bq34z100-G1 data flash is a non-volatile memory that contains bq34z100-G1 initialization, default,cell status, calibration, configuration, and user information.
bq34z100-G1データフラッシュは、bq34z100-G1の初期化、デフォルトを格納した不揮発性メモリです。セルの状態、較正、設定、およびユーザー情報。
The data flash can be accessed in several different ways, depending on in what mode the bq34z100-G1 is operating and what data is being accessed. データ フラッシュには、いくつかの方法でアクセスできます。bq34z100-G1 がどのモードで動作しているか、またどのようなデータを使用しているかによって、異なる方法があります。アクセスされます。 Commonly accessed data flash memory locations, frequently read by a host, are conveniently accessed through specific instructions described in Chapter 2. These commands are available when the bq34z100-G1 is either in UNSEALED or SEALED modes.
ホストによって頻繁に読み込まれる、一般的にアクセスされるデータ・フラッシュ・メモリの位置は、便利にアクセスされます。第2章で説明されている特定の命令を使用してください。これらのコマンドは、bq34z100-の場合に使用できます。 G1 は、UNSEALED または SEALED モードになっています。
Most data flash locations, however, can only be accessible in UNSEALED mode by use of the bq34z100-G1 evaluation software or by data flash block transfers. These locations should be optimized and/or fixed during the development and manufacture processes.
しかし、ほとんどのデータ・フラッシュ・ロケーションは、bq34z100-を使用することによってのみUNSEALEDモードでアクセス可能です。
G1 評価ソフトウェア、またはデータフラッシュブロック転送によって。これらの位置は、最適化および/または固定されている必要があります。の開発および製造工程で使用されています。

They become part of a Golden Image File and can then be written to multiple battery packs. Once established, the values generally remain unchanged during end-equipment operation.
これらはゴールデンイメージファイルの一部となり、以下のことが可能です。は複数のバッテリーパックに書き込まれます。
一度確立された値は、一般的には エンド機器の操作に使用することができます。
To access data flash locations individually, the block containing the desired data flash location(s) must be transferred to the command register locations where they can be read to the host or changed directly.
データ・フラッシュ・ロケーションに個別にアクセスするには、希望するデータ・フラッシュ・ロケーションを含むブロックをコマンド・レジスタ・ロケーションに転送して、ホストに読み込ませたり、直接変更したりする必要があります。
This is accomplished by sending the set-up command BlockDataControl() (code 0x61) with data 0x00. Up to 32 bytes of data can be read directly from the BlockData() command locations 0x40…0x5F, externally altered, then re-written to the BlockData() command space. Alternatively, specific locations can be read,altered, and re-written if their corresponding offsets are used to index into the BlockData() command space.
これは、セットアップ・コマンド データ 0x00 を持つ BlockDataControl() (コード 0x61)。最大 32 バイトのデータを BlockData() コマンド位置 0x40 ~ 0x5F から直接読み込んで、外部から変更した後、BlockData() コマンド空間に再書き込みすることができます。あるいは、特定の場所を読み込むこともできます。
Finally, the data residing in the command space is transferred to data flash, once the correct checksum for the whole block is written to BlockDataChecksum() (command number 0x60).
最後に、コマンドスペースに存在するデータは、一旦、データフラッシュに転送されます。ブロック全体のチェックサムは、BlockDataChecksum() (コマンド番号 0x60) に書き込まれます.その対応するオフセットが BlockData() コマンドへのインデックスに使用されている場合は、変更され、書き直されます。スペースに転送されます。

Occasionally, a data flash class will be larger than the 32-byte block size.
時折、データ・フラッシュ・クラスが32バイトのブロック・サイズよりも大きくなることがあります。
In this case, the DataFlashBlock() command is used to designate which 32-byte block in which the desired locations reside.
この場合は DataFlashBlock() コマンドを使用して、どの 32 バイトブロック内の任意の場所に が存在することを示しています。
The correct command address is then given by 0x40 + offset modulo 32. For example, to access Terminate Voltage in the Gas Gauging class, DataFlashClass() is issued 80 (0x50) to set the class.
正しいコマンドアドレスは、0x40 + offset modulo 32 で与えられます。例えば ガスゲージクラスの電圧を終端し、DataFlashClass()を80(0x50)発行してクラスを設定します。

Because the offset is 48, it must reside in the second 32-byte block. Hence, DataFlashBlock() is issued 0x01 to set the block offset, and the offset used to index into the BlockData() memory area is 0x40 + 48 modulo 32 = 0x40 + 16 = 0x40 + 0x10 = 0x50; for example, to modify [VOLTSEL] in Pack Configuration from 0 to 1 to enable the external voltage measurement option.
オフセットは 48 なので、2 番目の 32 バイトブロックに存在する必要があります。そのため、DataFlashBlock()は0x01を発行してブロック・オフセットを設定し、BlockData()のメモリ・エリアへのインデックスに使用されるオフセットは0x40 + 48 modulo 32 = 0x40 + 16 = 0x40 + 0x10 = 0x50となります。
www.DeepL.com/Translator(無料版)で翻訳しました。

The device is shipped with a factory configuration for the default case of the 1-series Li-Ion cell.
このデバイスは、1シリーズLi-Ionセルのデフォルトケースの工場出荷時の構成で出荷されます。
This can be changed by setting the VOLTSEL bit in the Pack Configuration register and by setting the number of series cells in the data flash configuration section.
これは、Pack Configuration レジスタの VOLTSEL ビットを設定したり、データ・フラッシュ・コンフィギュレーション・セクションの直列セル数を設定したりすることで変更できます。 Multi-cell applications, with voltages up to 65535 mV, may be gauged by using the appropriate input scaling resistors such that the maximum battery voltage, under all conditions, appears at the BAT input as approximately 900 mV.
最大 65535mV までの電圧を持つマルチセル・アプリケーションでは、適切な入力スケーリング抵抗を使用して、すべての条件の下で最大バッテリ電圧が約 900mV として BAT 入力に表示されるように測定することができます。 The actual gain function is determined by a calibration process and the resulting voltage calibration factor is stored in the data flash location Voltage Divider. 実際のゲインは較正プロセスによって決定され、結果として得られる電圧較正係数は、データフラッシュの場所である電圧分圧器に保存されます。
For single-cell applications, an external divider network is not required. Inside the IC, behind the BAT pin is a nominal 5:1 voltage divider with 88 KΩ in the top leg and 22 KΩ in the bottom leg.
シングルセルアプリケーションの場合、外部分圧器ネットワークは必要ありません。IC 内部、BAT ピンの後ろ は公称5:1の分圧器で、上側の脚部に88KΩ、下側の脚部に22KΩの分圧器です。
This internal divider network is enabled by clearing the VOLTSEL bit in the Pack Configuration register.
この内部分圧器 は、パック・コンフィギュレーション・レジスタのVOLTSELビットをクリアすることで有効になります。 This ratio is optimum for directly measuring a single Li-Ion cell where charge voltage is limited to 4.5 V.
この比率が最適です。は、充電電圧が 4.5 V に制限されている単一のリチウムイオン電池を直接測定するためのものです。 For higher voltage applications, an external resistor divider network should be implemented as per the reference designs in this document.
より高い電圧のアプリケーションでは、外部抵抗分圧器ネットワークを このドキュメントのリファレンスデザインを参照してください。
The quality of the divider resistors is very important to avoid gauging errors over time and temperature.
分周器抵抗の品質は、次のような評価を避けるために非常に重要です。誤差は時間と温度で変化します。
It is recommended to use 0.1% resistors with 25-ppm temperature coefficient.
0.1%の抵抗器を25ppmの温度で使用することを推奨します。係数。
Alternately, a matched network could be used that tracks its dividing ratio with temperature and age due to the similar geometry of each element.
また、各要素の形状が類似しているため、温度と経年変化に伴う分圧比を追跡するマッチドネットワークを使用することもできます。
Calculation of the series resistor can be made per the equation below.
直列抵抗の計算は、以下の式に従って行うことができます。
Exceeding Vin max mV results in a measurement with degraded linearity.
Vin max mV を超えると、直線性が低下した測定になります。
The bottom leg of the divider resistor should be in the range of 15 KΩ to 25 K, using 16.5 KΩ:
分圧抵抗器の下肢は、16.5KΩを使用して15KΩ~25Kの範囲にする必要があります。
Rseries = 16500 Ω (Vin max mV – 900 mV)/900 mV For all applications, the Voltage Divider value in data flash will be used by the firmware to calibrate the total divider ratio.
すべてのアプリケーションでは、データフラッシュ内の分圧器の値は、ファームウェアによって総分圧比を較正するために使用されます。
The nominal value for this parameter is the maximum expected value for the stack voltage. このパラメータの公称値は、スタック電圧の最大期待値です。
The calibration routine adjusts the value to force the reported voltage to equal the actual applied voltage. 較正ルーチンは、報告された電圧が実際に印加された電圧と等しくなるように値を調整します。

For stack voltages under 4.5 V max, it is not necessary to provide an external voltage divider network.
スタック電圧が4.5V以下の場合は、外部分圧ネットワークを用意する必要はありません。
The internal 5:1 divider should be selected by clearing the VOLTSEL bit in the Pack Configuration register.
また、外部分圧ネットワークには、以下のような 内部 5:1 分周器は、パック・コンフィギュレーション・レジスタの VOLTSEL ビットをクリアして選択します。
The default value for Voltage Divider is 5000 (representing the internal 5000:1000 mV divider) when no external divider resistor is used, and the default number of series cells = 1.
分圧器のデフォルト値は、外部分圧抵抗を使用しない場合は5000(内部5000:1000mV分圧器を表す)であり、直列セルのデフォルト数は1です。 In the 1-S case, there is usually no requirement to calibrate the voltage measurement, since the internal divider is calibrated during factory test to within 2 mV.
1-S の場合、内部分圧器は工場出荷時のテストで 2 mV 以内に校正されているため、通常は電圧測定を校正する必要はありません。
.

In the multi-cell case, the hardware configuration is different. An external voltage divider network is calculated using the Rseries formula above.
マルチセルの場合は、ハードウェア構成が異なります。外部分圧ネットワークは を上記のRseriesの式を用いて計算します。
The bottom leg of the divider should be in the range of 15 KΩ to 25 KΩ.
仕切板の下脚は、15KΩの範囲内にあることが好ましい。を25KΩにする。

The device supports high current and high capacity batteries above 32.76 Amperes and 29 Ampere-Hours indirectly by scaling the actual sense resistor value compared with the calibrated value stored in the device.
The need for this is due to the standardization of a 2-byte data command having a maximum representation of +/–32767. When [SCALED] is set in the Pack Configuration register, this indicates that the current and capacity data is scaled. It is important to know that setting the SCALED flag does not actually change anything in the operation of the gauge. It serves as a notice to the host that the various reported values should be reinterpreted based on the scale used.
Because the flag has no actual effect, it can be used to represent other scaling values. See Section 3.2.5.

The device supports multiple options for using one to 16 LEDs as an output device to display the remaining state of charge, or, if Pack Configuration C [SOHDISP] is set, then state-of-health.
このデバイスは、1~16個のLEDを出力デバイスとして使用して充電残量の状態を表示したり、パック構成C[SOH
DISP]が設定されている場合には、状態を表示したりするための複数のオプションをサポートしています。
The LED/COMM Configuration register determines the behavior.
LED/COMM Configurationレジスタは、動作を決定します。
Bits 0, 1, 2 are a code for one of five modes. 0 = No LED, 1 = Single LED, 2 = Four LEDs, 3 = External LEDs with I2C comm, 4 = External LEDs with HDQ comm.
ビット0、1、2は5つのモードのうちの1つのコードです。0 = LEDなし、1 = シングルLED、2 = 4つのLED、3 = I2Cコモンによる外部LED、4 = HDQコモンによる外部LED。
Setting Bit 3, LED_ON, will cause the LED display to be always on, except in Single LED mode where it is not applicable.
ビット3のLED_ONを設定すると、Single LEDモードの場合を除き、LED表示が常時点灯します。
When clear (default), the LED pattern will only be displayed after holding an LED display button for one to two seconds.
クリア(デフォルト)の場合、LED表示ボタンを1~2秒間押し続けた場合のみLEDパターンが表示されます。
The button applies 2.5 V from REG25 pin 7 to VEN pin 2 (refer to Section 8.2).
ボタンは REG25 端子 7 から VEN 端子 2 に 2.5V を印加します(8.2 節参照)。
The LED Hold Time parameter may be used to configure how long the LED display remains on if LED_ON is clear.
LED Hold Timeパラメータを使用して、LED_ON がクリアの場合の LED 表示の点灯時間を設定することができます。
LED Hold Time configures the update interval for the LED display if LED_ON is set.
LEDHold Timeは、LED_ONが設定されている場合のLED表示の更新間隔を設定します。
Bits 4, 5, 6, and 7 are a binary code for number of external LEDs.
ビット4、5、6、7は外部LEDの数を表すバイナリコードです。
Code 0 is reserved. Codes 1 through 15 represents 2~16 external LEDs.
コード0は予約済みです。コード1~15は2~16個の外部LEDを表します。
So, number of External LEDs is 1 + Value of the 4-bit binary code.
従って、外部LEDの数は1+4ビットのバイナリコードの値となります。
Display of Remaining Capacity RemainingCapacity()or StateOfHealth() will be evenly divided among the selected number of LEDs.
残容量表示 RemainingCapacity()またはStateOfHealth()は、選択されたLED数を均等に分割して表示します。

External LED mode—Upon detecting an A/D value representing 2.5 V on the VEN pin, External LED mode will transmit the RSOC into an SN74HC164 (for 2–8 LEDs) or two SN74HC164 devices (for 9–16 LEDs) using a bit-banged approach with RC2 as Clock and RC0 as Data.
外部LEDモード:外部LEDモードは、VENピン上の2.5 Vを表すA/D値を検出すると、RC2をクロック、RC0をデータとしたビットバング方式で、RSOCをSN74HC164(2~8個のLED用)またはSN74HC164(9~16個のLED用)に送信します。
LEDs will be lit for a number of seconds as defined in a data flash parameter.
LED は、データフラッシュパラメータで定義された秒数だけ点灯します。
Refer to the SN54HC164, SN74HC164 8-Bit Parallel-Out Serial Shift Registers Data Sheet (SCLS115E) for details on these devices.
これらのデバイスの詳細については、SN54HC164、SN74HC164 8 ビットパラレル出力シリアルシフトレジスタデータシート(SCLS115E)を参照してください。 Extended commands are available to turn the LEDs on and off for test purposes.
テスト目的でLEDをオン/オフするための拡張コマンドが利用可能です。

Based on the selected LED mode, various options are available for the hardware implementation of an Alert signal.
選択されたLEDモードに基づいて、アラート信号のハードウェア実装には様々なオプションがあります。
Software configuration of the Alert Configuration register determines which alert conditions will assert the ALERT pin.
Alert Configuration レジスタのソフトウェア構成は、どのアラート条件が ALERT ピンをアサートするかを決定します。 The port used for the Alert output will depend on the mode setting in LED/Comm Configuration as defined in Table 3-9. The default mode is 0.
アラート出力に使用されるポートは、以下のようにLED/Comm Configurationのモード設定に依存します。表 3-9 で定義されています。デフォルトは 0 です。 The ALERT pin will be asserted by driving LOW. However, note that in LED/COM mode 2, pin TS/P6, which has a dual purpose as Temperature sense pin, will be driven low except when temperature measurements are made each second.
ALERT 端子は、LOW 駆動でアサートされます。ただし、LED/COMモード2では、毎秒の温度測定時以外は、温度センス端子としての役割を持つTS/P6端子はLOW駆動となりますのでご注意ください。 See the reference schematic in the bq34z100-G1 Wide Range Fuel Gauge with Impedance Track™ Technology Data Sheet (SLUSBZ5) for filter implementation details if host alert sensing requires a continuous signal.
ホストの警告検出に連続信号が必要な場合のフィルタ実装の詳細については、『bq34z100-G1 Wide Range Fuel Gauge with Impedance Track™ Technology Data Sheet』(SLUSBZ5)の参照回路図を参照してください
The ALERT pin will be a logical OR of the selected bits in the new configuration register when asserted in the Flags register. The default value for Alert Configuration register is 0.
ALERT ピンは、Flags レジスタでアサートされると、新しい構成レジスタで選択されたビットの論理 OR になります。Alert Configuration レジスタのデフォルト値は 0 です。

  • CONTROL_STATUSレジスタのFAS,SSビットが1であることを確認.両方とも1のときSEALED state
  • Control()コマンド(0x00,0x01)に下位バイトUNSEALキー(0x0414)を書き込む
  • Control()コマンド(0x00,0x01)に上位バイトUNSEALキー(0x3672)を書き込む
  • 100ms待つ
  • CONTROL_STATUSレジスタのFASが1,SSビットが0となっていればUNSEALED stateに切り替わってる.
  • 3回試す(これは1回目で成功しても3回試すのか,失敗しても3回は試すの意味なのかどっちなんだろう)

UNSEALキーは0x36720414なので,下位バイトから順番に書き込んでいく.
0x140x040x720x36

  • CONTROL_STATUSレジスタのFASが1,SSビットが0となっていればUNSEALED state
  • Control()コマンド(0x00,0x01)に下位バイトUNSEALキー(0xFFFF)を書き込む
  • Control()コマンド(0x00,0x01)に上位バイトUNSEALキー(0xFFFF)を書き込む
  • 100ms待つ
  • CONTROL_STATUSレジスタのFAS,SSビットが0となっていればFULL ACCESS stateに切り替わってる.
  • 3回試す(これは1回目で成功しても3回試すのか,失敗しても3回は試すの意味なのかどっちなんだろう)
  • Control()コマンド(0x00,0x01)にSEALキー(0x0020)を書き込む
  • 200ms待つ
  • CONTROL_STATUSレジスタのFAS,SSビットが1となっていればFSEALED stateに切り替わってる.
  • 3回試す(これは1回目で成功しても3回試すのか,失敗しても3回は試すの意味なのかどっちなんだろう)

CONTROLSTATUSを試しに読んでみたけどFAS,SSビットが両方とも0になっていて何も信用できない.というかCONTROLSTATUSレジスタ中身が全部0
SEALDモードならFAS,SSビット両方とも1のはず,UNSEALEDモードならSSビットのみ0になる.
Control()のサブコマンドは,2byte(0x00,0x01)にそれぞれSubcommandsを書き込み,その後アクセスするという使い方でいいのだろうか.
Using I2C Communications With the bq34110, bq35100, and bq34z100-G1 Series of Gas Gauges
を参照する. ここにI2Cでのレジスタアクセスの順番とか書いてある.
気になったんだけど,Write命令のときにスレーブからNACKって返してくれるの? NACKのタイミングってスレーブではわからなくない?

  • ba34z100g1.txt
  • 最終更新: 2020/10/18
  • by yuqlid