6.8. MCU 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.8.1. v02.02.00 (i.e release v26.00.00) from v02.01.01 (i.e release v01.04.01) Migration

6.8.1.1. Summary

Version v02.02.00 introduces the following changes to the MCU module:

  1. Automatic CPUSEL/FRAMESEL Register Writes via ResourceAllocator: Mcu_Init() now writes CPUSEL and FRAMESEL peripheral ownership registers from ResourceAllocator configuration

  2. McuSysClkDiv Recommended Configuration Update (Errata Advisory): Configurator now warns when McuSysClkDiv = 1; recommended to use McuSysClkDiv >= 2 to avoid XRSn reset errata

6.8.1.2. Change 1: Automatic CPUSEL/FRAMESEL Register Writes via ResourceAllocator

6.8.1.2.1. Description

Version v02.02.00 extends Mcu_Init() to write CPUSEL (CPU selection) and FRAMESEL (frame selection) peripheral ownership registers for all peripherals configured in the ResourceAllocator plugin. The configuration is generated into a new Mcu_PeripheralConfigSet[] array and Mcu_PeripheralConfig struct in Mcu_Cfg.c.

Projects that previously wrote CPUSEL/FRAMESEL registers manually must remove those manual writes to avoid conflicts.

6.8.1.2.2. Old vs New

Behavior

v02.01.01

v02.02.00

CPUSEL/FRAMESEL register writes

Application responsibility (manual)

Written automatically by Mcu_Init() from ResourceAllocator config

Warning

If your application or any BSW module manually writes CPUSEL or FRAMESEL registers, those writes must be removed. Duplicate writes after Mcu_Init() may overwrite the generated ownership configuration and cause unexpected peripheral behavior.

6.8.1.2.3. Migration Actions

  1. Verify ResourceAllocator configuration: Confirm that the ResourceAllocator plugin is configured with the correct CPU and frame ownership for each peripheral used in your project

  2. Identify manual CPUSEL/FRAMESEL writes: Search your application code and any BSW integration code for direct writes to CPUSEL and FRAMESEL registers for the peripherals listed above

  3. Remove manual register writes: Delete or disable all manual CPUSEL/FRAMESEL register writes that are now handled by Mcu_Init()

  4. Regenerate MCU configuration files: Regenerate Mcu_Cfg.c and Mcu_Cfg.h using the updated generator (see Change 1, step 1 — this step is shared)

  5. Verify Compilation and runtime behavior: Clean build, run on target, and confirm all peripherals are accessible from the expected CPU after Mcu_Init() completes


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

6.8.2.1. Summary

Version v02.00.00 introduces configuration structure name changes to comply with AUTOSAR requirement TPS_ECUC_08011:

  1. Configuration Structure Name Change: MCU configuration structure names updated for AUTOSAR TPS_ECUC_08011 compliance

6.8.2.2. Change 1: Configuration Structure Name Change

6.8.2.2.1. Description

Version v02.00.00 changes the configuration structure names for AUTOSAR TPS_ECUC_08011 compliance. This change ensures compliance with AUTOSAR naming conventions and requires updates to application code that references the MCU configuration structures. The specific structure names depend on the clock source being used in your configuration.

6.8.2.2.2. Old vs New Configuration Structure

Configuration Structure Name Mapping:

v01.01.00 and older

v02.00.00

McuConf*

Mcu_Config*

Note

The name of the configuration structures depends on the clock source being used.

Code Examples:

// v01.01.00 and older
Mcu_Init(&McuConf*);

// v02.00.00
Mcu_Init(&Mcu_Config*);

6.8.2.2.3. Migration Actions

  1. Identify Current Structure Names: Determine the exact configuration structure names used in your project based on your clock source configuration

  2. Search Application Code: Find all references to McuConf* patterns in your application code

  3. Replace Structure Names: Update all references from McuConf* pattern to Mcu_Config* pattern

  4. Update Function Calls: Ensure all MCU initialization calls use the new structure names

  5. Update Upper Modules: Update any upper modules that reference the MCU configuration structures to use the new structure names

  6. Verify Compilation: Clean build and verify no compilation errors related to MCU configuration structures