RTA Knowledge Base

Introduction

Scope

This application note will show how to create a Lin node importing the relative LDF file. In this example, the Lin node will be imported in an existing ECU with CAN node already configured.

Preconditions

  • ECU name in LDF is matching with the existing ECU in the System
  • BSW makes use of the RTA-BSW configurator generator
  • RTE, BSW and OS are generating with no issue

Import LDF in ISOLAR

LDF Importer

Select LDF import feature from ISOLAR-A

Select the LDF file from your file system. Select the ECU name (even if it’s already selected, open the Ecu name menu and select the ECU to activate the merge option):

In File Merge Preferences selected the wanted merge option.

Select ECU and Frames

In the next window select the required Master ECU, and then the Lin frames:

As result of the import, ISOLAR-A will create PDUs, Frames and Signals. It will also create a new Lin network:

BSW Configuration

It is now possible to generate the BSW configuration; RTA-BSW will create the configuration for the new modules LinIf and LinSM:

The following actions needs to be added to the initialization of the ECU to complete the BSW integration:

  1. Initialize LinIf
  2. Initialize LinSM
  3. ComM allow communication on Lin channel
  4. ComM set FULL_COMM for Lin channel
  5. Lin Schedule tables shall be activated

All these action can be implemented by BswM adding them in the BswMActions and BswMActionLists.

NB: Point 1 to 4 are same as any ComM channel (e.g. CAN nodes), while point 5 is dedicated for Lin channels.

The following pictures show a sample configuration:



BSW Code generation

It’s now possible to generate the BSW code. RTA-BSW will update the COM stack modules with the new configuration and will create the LinIf and LinSM source code:

RTE integration

From ECU Configurator open the Rte modules and add the LinSM and LinIf module instance. This step is BSW module equivalent of adding a SWC to the Composition

Now in the RTE Editor, Entity to Task Mapping window, map the LinIf, LinSM and the new ComM MainFunction to a task

Then generate the RTE.

MCAL Integration

Lin driver shall be configured in the MCAL generation tool. The driver configuration does not contains information about frames (which means that frames does not have to be aligned) but it contains Channel configuration that shall be aligned to the BSW configuration. RTA-BSW generates a Lin configuration, but is limited to the LinChannels, this configuration can be imported into MCAL, but the driver will require additional configuration not depending on the BSW. After the Lin has been configured and generated, it may require to be integrated in the system for:

  • MainFunciton: scheduled by task
  • Init: invoked by EcuM in the InitList

Update build environment

When all the new modules have been generated, is time to update the build environment to add these modules to the building list. During this phase some integration files may require adaption to integrate the BSW with the MCAL.