Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. The type of register check is either from OTPM, or from the supplied value.

    1. OTPM; the default value is stored in OTPM because either the Si default is incorrect or the value is unique to each Si. No writes of this type are allowed.
      RegDB2: “Overwrite Check”.

    2. Supplied; the default value is correct in the Si. Use
      RegDB2: “Overwrite Check” and “Check Value” field for this method.

  2. Supply a bit-field mask to isolate specific bits, if necessary. Otherwise the entire register is checked.
    Use RegDB2 “Check Bitmask” field for this method , and “Check Value” must be populatedfor either OTPM or Supplied.
    Notes:
    Ensure that the “Check Value” fits “Check Bitmask”.
    “Check Value” is the full value, no shifting required to fit the “Check Bitmask”.

  3. Choose either Error or Warning as the result of a mismatch.

    1. Error; the value should never be changed.

    2. Warning; the value may be changed in certain circumstances, and must be discussed with onsemi support personnel.

...

There will be a period of development when the OTPM-based overwrite registers have been identified but have not yet been added to OTPM. When the OTPM-based registers that need overwrite protection have been entered in to RegDB2, a function should be created that checks for these registers' presence in OTPM and set them if not found These same register settings must be removed from the base Shared Settings as they are now accounted for in this new function. The function should be called with the Reset function as that is called to initialize a Mode. Only available for ApBase, so place in src\devware\customize.ini

[OTPM_Init]

regs=[
[
0x30c6, 1],
[
0x30c8, 2],
[
0x30ca, 3]]

for rows in regs:
if rows[0] not in apbase.Camera().sensor.otpm_registers_by_address:
reg.reg(rows[0]).value=rows[1]

...

These Warnings can be disabled by selecting the check-box of “Don’t show this message in a pop-up again.”.
It can be re-enabled via “Options / Warning Dialogs / Reset All”.

Script to Check for Register and Bit-field Overwrites

Use the DevWareX Command-Line Utility “field_wr” with option “-overwrite” to check a DevWareX Log for register overwrites. Usually meant for INI files from customers as Shared Settings does this check during the compile stage.

The INI file must be in REG= / BITFIELD= format. Select “Enable Log”, select “Hex” for the register format.

...

Run the preset. When completed, select “Save to Ini…” to capture the results.

Note that any bit-field writes in the settings (read/modify/write) are not captured as such in the converted INI file, but instead as a register write (“REG=”).  This is not an issue as “field_wr” will be using the Overwrite fields from the SDAT file, specifically “Check Bitmask” and “Check Value”. Note that Writes to OTPM Check Types are never allowed as these are loaded from OTPM.

Usage instructions for “field_wr” are found here.

Appendix

The contents of the .txt file used to generate the above example.

...