5.1.40. DTC memory update (pdtc_Memory)

Retain the DTC tables in non-volatile storage across power cycles.

5.1.40.1. Supported targets

All targets

5.1.40.2. Required license

None (Main library). (See Section 2.3, “Licensed Features”.)

5.1.40.3. Description

The pdtc_Memory block stores the DTC table data in non-volatile memory. On start-up, the block attempts to retrieve the DTC table data prior to running the model. While the model is running, the time at which the DTC table is stored back to non-volatile memory is determined by the model itself.

The DTC table data is check-summed using a 16-bit CRC. Failure to match the check-sum against the table data on start-up means that the data cannot be recovered. In this case, DTC table data is reverted to the default start-up conditions for each type of DTC (see the pdtc_DiagnosticTroubleCode and pdtc_DiagnosticTroubleCodeExt blocks for specifics).

When an application is programmed onto the ECU, any pre-existing DTC data (and any related diagnostic information) are cleared if the model version number differs from what was previously programmed. However, if the model version number remains the same, and the total number of DTCs in the model also remains the same, then the pre-existing DTCs are retained. The model version number is specified through the put_Identification block.

This block is used to update the check-sum and write the DTC table data to non-volatile store. When the inport commit_dtcs is set to 1, the block pauses execution of the model, calculates the DTC table data check-sum, stores the DTC table data in non-volatile memory, then continues execution of the model.

Note

When the block pauses the model execution, the length of pause depends on the store location. Storage in battery backed RAM will result in a short pause, storage to Flash will result in a longer pause.

Old DTC data is reused so long as it has the expected total data size and was written by an application with the same user-specified version number. Otherwise the values revert to defaults. If the usage of DTC blocks has changed in a new software version, increase the application sub-minor version number to ensure that any old values are not used, as they may not map appropriately to the blocks in the new model even if the total data size happens to match.

It is important to trigger the commit and not update any diagnostic trouble code thereafter before shutting down the ECU. If diagnostic trouble code data is modified after the check-sum has been updated, and the ECU shuts down, next time it powers up, diagnostic trouble code data will revert to default.

To ensure the check-sum is up to date before shutting down the ECU, the store_up_to_date outport provides an indication of whether the check-sum is correct or not. If not, shutdown of the module can be prevented (if conditions are appropriate) and the store updated (by setting the commit_dtcs inport to 1).

5.1.40.4. Inports

  • sim_store_up_to_date

    Simulation value for the outport store_up_to_date.

    Range: 0 or 1

    Value type:Boolean
    Calibratable:No
  • commit_dtcs

    Set to 1 to update the check-sum for the DTC tables and to write the result to non-volatile memory. Set to zero otherwise.

    Range: 0 or 1

    Value type:Boolean
    Calibratable:No

5.1.40.5. Outports

  • store_up_to_date

    Set to 1 if the check-sum and DTC table data match, set to zero otherwise.

    Range: 0 or 1

    Value type:Boolean
    Calibratable:No

5.1.40.6. Mask parameters

  • Storage location

    A drop-down of memory storage locations for the DTC table data.

    Value type:List
    Calibratable:No

5.1.40.7. Notes

Battery backed RAM is a deprecated type of storage not present on current Pi ECUs. This option should not be selected unless the ECU technical specification indicates that it is supported on your ECU.