6.13. CDD ECAP Module Migration

Migration Approach: Follow sequential migration for clear understanding of changes at each version. Each migration is organized by individual changes with description, old vs new comparison, and migration actions.

6.13.1. v03.00.00 (i.e release v01.04.00) from v02.00.00 (i.e release v01.03.00) Migration

6.13.1.1. Summary

Version v03.00.00 introduces Resource Allocator as a mandatory architectural foundation and replaces duty cycle measurement from the signal measurement API with a dedicated API:

  1. Resource Allocator Introduction and Channel Configuration Updates: Resource Allocator becomes mandatory with CDD ECAP channel configurations updated to reference Resource Allocator instances

  2. Duty Cycle Removed from Signal Measurement Property — Use Cdd_Ecap_GetDutyCycleValues() Instead: CDD_ECAP_DUTY_CYCLE removed from Cdd_Ecap_SignalMeasurementPropertyType; replaced by a dedicated Cdd_Ecap_GetDutyCycleValues() API

PREREQUISITE: Complete Resource Allocator Setup before proceeding.

6.13.1.2. Change 1: Resource Allocator Introduction and Channel Configuration Updates

6.13.1.2.1. Description

Resource Allocator becomes a mandatory architectural foundation for the CDD ECAP module, with CDD ECAP channel configurations updated to reference Resource Allocator instances. This represents a fundamental shift from direct parameter configuration to centralized resource management, where CDD ECAP instances are allocated through Resource Allocator and then referenced by channel configurations.

6.13.1.2.2. Old vs New Configuration

Old (v02.00.00): Direct parameter selection was used without Resource Allocator dependency.

Old CDD ECAP Config

Fig. 6.55 v02.00.00: Direct ECAP channel parameter selection

New (v03.00.00): CDD ECAP channel configurations now reference instances allocated through Resource Allocator.

Select CDD ECAP Instance

Fig. 6.56 v03.00.00: Update CddEcapChannelRef to reference the corresponding Resource Allocator’s Cdd_EcapAllocatedInstance

6.13.1.2.3. Migration Actions

  1. Setup Resource Allocator: Follow Resource Allocator Setup

  2. Navigate to Context: Navigate to ResourceAllocatorGeneral → Context → Cdd_Ecap and add CDD ECAP allocator:

Add CDD ECAP Allocator

Fig. 6.57 Navigate to Context and add CDD ECAP allocator

  1. Add CDD ECAP Instance: Add Cdd_EcapAllocatedInstance entries for each ECAP instance your application requires:

Add CDD ECAP Instance

Fig. 6.58 Add Cdd_EcapAllocatedInstance entries for each ECAP instance your application requires

  1. Configure ECAP Instance: Set the appropriate InstanceName for each allocated instance:

Configure CDD ECAP Instance

Fig. 6.59 Set the appropriate InstanceName (e.g., ECAP1, ECAP2, etc.)

  1. Complete Configuration: Finalize CDD ECAP instance allocation

  2. Navigate to CddEcapChannel: Navigate to Cdd → CddEcapChannel and update configurations to reference the CDD ECAP instances allocated in Resource Allocator

  3. Open Channel Configuration: Access the CddEcapChannel configuration that needs to be updated

  4. Set Instance Reference: Set CddEcapChannelRef to point to the corresponding Cdd_EcapAllocatedInstance in Resource Allocator

  5. Verify Automatic Derivation: Confirm that the CddEcapChannelId parameter is now automatically derived from the Resource Allocator reference

Note

The Resource Allocator module must be configured before the CDD ECAP module to ensure correct instance availability. Available ECAP instances are determined by the Resource Allocator’s Cdd_EcapAllocatedInstance configuration for the current context.

6.13.1.3. Change 2: Duty Cycle Removed from Signal Measurement Property — Use Cdd_Ecap_GetDutyCycleValues() Instead

6.13.1.3.1. Description

CDD_ECAP_DUTY_CYCLE has been removed from the Cdd_Ecap_SignalMeasurementPropertyType enum, which is used as input to Cdd_Ecap_GetTimeElapsed(). Duty cycle is not an AUTOSAR-defined signal measurement property.

A dedicated API Cdd_Ecap_GetDutyCycleValues() has been added to calculate duty cycle. It returns a Cdd_Ecap_DutyCycleType struct containing ActiveTime and PeriodTime, from which the duty cycle can be derived.

Any application code that passed CDD_ECAP_DUTY_CYCLE to Cdd_Ecap_GetTimeElapsed() must be updated to use the new API.

6.13.1.3.2. Old vs New

Cdd_Ecap_SignalMeasurementPropertyType enum:

v02.00.00

v03.00.00

CDD_ECAP_LOW_TIME

CDD_ECAP_LOW_TIME

CDD_ECAP_HIGH_TIME

CDD_ECAP_HIGH_TIME

CDD_ECAP_PERIOD_TIME

CDD_ECAP_PERIOD_TIME

CDD_ECAP_DUTY_CYCLE

(removed)

Code Example:

// v02.00.00 — duty cycle via GetTimeElapsed (no longer valid)
Cdd_Ecap_ValueType dutyCycle = Cdd_Ecap_GetTimeElapsed(channel);  // with CDD_ECAP_DUTY_CYCLE property

// v03.00.00 — dedicated API
Cdd_Ecap_DutyCycleType dcValues;
Cdd_Ecap_GetDutyCycleValues(channel, &dcValues);
// dcValues.ActiveTime — active (high) time of the signal
// dcValues.PeriodTime — full period time of the signal

6.13.1.3.3. Migration Actions

  1. Search Application Code: Find all uses of CDD_ECAP_DUTY_CYCLE passed to Cdd_Ecap_GetTimeElapsed().

  2. Enable New API: Set CDD_ECAP_GET_DUTY_CYCLE_VALUES_API to STD_ON in your ECAP plugin configuration.

  3. Replace API Call: Replace Cdd_Ecap_GetTimeElapsed() duty cycle calls with Cdd_Ecap_GetDutyCycleValues(), using the returned ActiveTime and PeriodTime fields.

  4. Verify Compilation: Clean build and confirm no undefined references to CDD_ECAP_DUTY_CYCLE.


6.13.2. v02.00.00 (i.e release v01.03.00) from v01.00.00 (i.e release v01.02.00) Migration

6.13.2.1. Summary

Version v02.00.00 introduces new parameters for enhanced functionality and high-resolution capture capabilities while maintaining backward compatibility for basic ECAP operations:

  1. Emulation Mode Support: CddEcapEmulationMode parameter added for debug scenarios

  2. High-Resolution Mode Features: CddEcapHREnable and CddEcapHRConfigApi parameters added for finer capture resolution

6.13.2.2. Change 1: Emulation Mode Support

6.13.2.2.1. Description

Version v02.00.00 introduces emulation mode support for debug scenarios through the new CddEcapEmulationMode parameter. This parameter controls ECAP behavior during debug and emulation operations.

6.13.2.2.2. Old vs New Parameter Configuration

New Parameter Added:

Parameter

v01.00.00

v02.00.00

CddEcapEmulationMode

Not available

Added for debug/emulation control

Parameter Details:

  • Purpose: Controls ECAP behavior during debug/emulation scenarios

  • Location: CddEcapChannel container

  • Configuration: Required for debug setup compatibility

6.13.2.2.3. Migration Actions

  1. Navigate to CddEcapChannel: Open CddEcapChannel container in EB Tresos

  2. Configure Emulation Mode: Set the CddEcapEmulationMode parameter as required for your debug setup

  3. Verify Debug Compatibility: Ensure the emulation mode setting matches your development and debug environment requirements

6.13.2.3. Change 2: High-Resolution Mode Features

6.13.2.3.1. Description

Version v02.00.00 introduces high-resolution (HR) mode capabilities for finer capture resolution through two new parameters: CddEcapHREnable and CddEcapHRConfigApi. These features are optional and provide enhanced capture precision when required.

6.13.2.3.2. Old vs New Parameter Configuration

New Parameters Added:

Parameter

v01.00.00

v02.00.00

CddEcapHREnable

Not available

Added for high-resolution capture functionality

CddEcapHRConfigApi

Not available

Added for high-resolution API functions

Parameter Details:

  • CddEcapHREnable: Enable high-resolution mode for finer capture resolution

  • CddEcapHRConfigApi: Enable/disable high-resolution API functions

  • Usage: Optional features - only enable if high-resolution capture is needed

6.13.2.3.3. Migration Actions

  1. Evaluate HR Requirements: Determine if your application requires high-resolution capture functionality

  2. Enable HR Mode (Optional): If finer capture resolution is needed, enable CddEcapHREnable parameter

  3. Enable HR APIs (Optional): If high-resolution API functions are required, enable CddEcapHRConfigApi parameter

  4. Maintain Compatibility: For applications not requiring HR features, leave parameters in default configuration to ensure backward compatibility

Important

For users migrating from v1.0.0 to v2.0.0 who do not require High-Resolution Mode features or Emulation Mode support, the default configurations ensure backward compatibility and will not affect your current working setup.