This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ76952: Recommended way to obtain checksum for the entire data memory registers (Integrity check)

Part Number: BQ76952

Tool/software:

Hi,

Our BMS features a BQ76952 (AFE), and we have developed a separate tool (i.e., an AFE programmer) to perform OTP programming for the AFE during production. To ensure the AFE is configured correctly, we are looking to implement a logic to verify the integrity of the entire data memory registers.

One possible approach is to read all the data, store it in a large buffer, compute a checksum in both the AFE programmer and the BMS, and then compare the results. However, this would introduce a significant amount of code just to implement the integrity check.

Given this, is there a built-in feature in the AFE that can help achieve this more efficiently?

Any recommendations would be appreciated.

Best regards,

Kyungjae Lee

  • Hello Kyungjae,

    Just to make sure, did you want this during production (once) or also continuously once it's in the system (more than once?)

    If it's just during production (once), the subcommand 0x005 STATIC_CFG_SIG() subcommand may be able to help with what you are looking for.

    It calculates a digital signature for the static configuration data and compares it to a stored value. If the result does not match the stored signature, the MSB returned is set. Unfortunately, this subcommand will exclude calibration values, so those you may need to still check manually by reading the registers. 

    You will also still need to know the signature after writing OTP to the device, however, once you have it, you can reset the device (have it upload it's OTP settings), and check with this subcommand before writing any other commands that may change the signature.

    Further information about this command is given in Table 12-23. Subcommands Table (continued) from the TRM. 

    Best Regards,
    Alexis

  • Hi Alexis,

    Thank you for your response. Let me give you a bit of background to provide context. Our BMS programming process consists of the following two steps:

    1. Performing OTP programming of the AFE (via our custom tool)

    2. Programming the microcontroller of the BMS

    During its initialization phase, the firmware running on the BMS microcontroller attempts to verify that the contents of the OTP (or data) memory match what was programmed in step 1 and that no unintended changes have occurred.

    In our current implementation, the BMS microcontroller firmware reads back the OTP-programmed parameters and compares each one to its expected value. However, a limitation of this approach is that it doesn't verify untouched data memory registers. As a result, if any of those registers are unintentionally altered or corrupted, we have no way to detect it.

    Given this, I was looking for a way to generate a signature of the OTP memory during step 1 (after AFE programming), and then compare that signature during the BMS microcontroller’s initialization phase to verify memory integrity.

    As you mentioned, using the 0x0005 STATIC_CFG_SIG() seems to be a tempting option, but the fact that it won't include the calibration values worries me. What does the 'calibration values' mean in this context by the way?

    Is there a way I can obtain the digital signature of the OTP or this use?

    Thank you,

    Kyungjae Lee