RTA Knowledge Base

Skip to end of banner
Go to start of banner

RTA-CAR 9.1.1 - 10. LNM Integration

Introduction

Scope

This application note describes how to integrate the RTA-SUM LNM module in your RTA-CAR project.

Prerequisites

  • The integrator has read RTA-SUM_LNM_User_Guide.pdf available in the RTA-SUM package.
  • It is assumed you have followed the RTA-CAR 9.1.1 - 1. SUM Integration - Getting started to install the RTA-SUM plugin.
  • In order to successfully follow this guide, you shall have the RTA-CAR toolchain installed and you must be familiar with the AUTOSAR specifications, terminology and methodology. You also must be familiar with the GM specification and GM-SUM modules functionalities.

Create LNM module

  • In the ECU Navigator, right click on Other Modules and select Create LNM
  • In "New AR Element Creation" popup (see next image), put the name of the module in the LNM field
  • Select Create New AR Package
  • Put the file name, for example "SUM_LNM_EcucValues.arxml"

LNM Configuration

LNM_General

Attributes

The configuration of the LNM module comes with some parameters automatically filled with default values at module creation.

The integrator shall review the default values and adjust them to their specific project needs. The parameters definition can be viewed in "Quick Info" or "Description View".

References

In the LNM General container, the DID F1BE should be referenced. The Dcm module should be configured to support the F1BE DID

LNM_Networks & LNM_Arbitration

These container should be filled by the integrator, to configure information on the individual LIN Network structures in order to fulfill all the project specific requirement 

  • LMNNetwork: general information of the LIN channel and configuration of the channel activation / deactivation and MSCL strategies
  • LNM_Slaves: configuration of slaves connected in the LIN channel and their relative diagnostic information 
  • LNM_ScheduleManagement: configuration of the schedule table switch strategy of the LIN channel
  • LNM_Arbitration: configuration of all the project specific logic that has to be provided to the schedule table finite state machine of all the configured LIN Networks


For the configuration of the LIN module, please refer to the RTA-SUM_LNM_User_Guide available in RTA-SUM package. It contains detailed information on how to configure the LNM module accordingly to the project specific needs. Also practical configuration examples are shown. It is also possible to refer to the RIP for a sample LNM configuration.

Generate the LNM Module

Now it is possible to run the LNM Build by following the RTA-SUM Generation section of RTA-CAR 9.1.1 - 1. SUM Integration - Getting started.

Dcm Configuration 

LNM module supports the DID F1BE, therefore it should be configured in the Dcm module

NvM Configuration

LNM makes use of persistent memory to store MSCL. Therefore, a NvM block be configured by the integrator. Please notice to adapt the size of the block to the number of configured LIN channels (the MSCL NvM block size is 2 bytes long for each LIN network)


Important: The NvM Ram block shall be initialized by the integrator to the value {0} with some integration code. 

Example (1 LIN network only, i.e., 2Bytes NvM block)

Integration
uint8 LNM_MSCL_NvM[2] = {0};

WdgM Configuration

LNM is a supervised entity of WdgM. Therefore, it constantly updates WdgM module that its code is running. It is needed to configure a new supervised entity and its corresponding Alive Supervision in the WdgM.

In the following sample configuration it is considered that the Main Function is running with a periodicity of 100ms, and the Supervision Cycle is configured as 10ms. Therefore, the Aliveness mechanism is configured to expect 10 counts in 100 supervision cycles.

BswM Configuration

LNM Data Type Mapping Set and Headers

For the following BswM configurations in this chapter, it is mandatory to include LNM_DataTypeMappingSet and some user headers in BswM configuration

LNM Init function

If the configuration parameter LNM_RunnableInitEnabled is set to false for LNM generation, LNM module shall be initialized at ECU initialization trough BswM module configuration

LNM Data Type Mapping Set and Headers

For the following BswM configurations in this chapter, it is mandatory to include LNM_DataTypeMappingSet and some BswMUserIncludeFiles in BswM configuration

LNM Communication Channel Request

For each LIN Network, LNM shall be allowed to request FULL communication or NO communication of the corresponding LIN channel.

Therefore, BswM should be properly configured to allow LNM to send request to BswM with the desired communication status as shown in the following example

The ModeRequestPort is used to collect LNM request relative to the channel status. 




IMPORTANT:

The criteria to activate / deactivate the LIN channel are Project Specific, and must be provided by the integrator trough the LNM RP_LNM_ActivationSignal_<LIN_Channel_Name> port.

It is possible to configure both activation and deactivation criteria on the basis of this activation signal. For more information on this configuration, please refer to the SUM_LNM User Guide.

LNM Communication Channel Mode User

For each LIN Network, LNM shall monitor the status of the corresponding LinSm channel. LNM must be notified by means of a BswMSwitchPort, configured with the following logic







LNM Schedule Request / Mode User

Similarly to what has been done to request and monitor the LIN Channel status, LNM shall have the chance to request to the BswM for a schedule switch, and must continuously monitor the schedule that is currently used in the LIN channel.

Since the BswM configuration is completely similar, it is not reported in this document, anyway it is possible to refer to the RIP for the actual configuration.

IMPORTANT:

Also the criteria to switch the LIN schedules are Project Specific, and must be provided by the integrator trough the LNM RP_LNM_ScheduleSignal_<ScheduleSignal_Name> port.

It is possible to configure both activation and deactivation criteria on the basis of this activation signal. For more information on this configuration, please refer to the SUM_LNM User Guide.


ASW and System Update

Now the BSW and the LNM configuration is completed. The next step is to update the ASW adding the LNM to the composition and creating the connections with the other SWC (ASW, DEM, DCM, other SUMs).

An example might be the LNM, that needs to be connected to the SUSD for the PermitExecution and the ShutdownPermission signals (please refer to the SUSD and LNM User Guide for further information).

How to create the connections is out of the scope of this AN. Please consult the RTA-CAR Guides for more information.

In the RIP we also added a test SWC to test the LNM functionalities.

Now you can:

  1. Update all the connections in the ASW composition
  2. Add the SWC to the ECU Mapping using the "SWC To ECU Mapping Editor"
  3. Map the new signals in the Signal Mapping Editor
  4. Regenerate the Ecu Extract
  5. Update the RTE Configuration mapping the new runnables to the Tasks

BSW/RTE/OS generation

The last steps are:

  1. Run the BSW Code Generator
  2. Regenerate the RTE
  3. Generate OS

Integration with the LNM is complete.


LNM Known Issues

  • RP_WdgM_LNM_AliveSupervision makes use of an old interface. It must be updated manually to the new one Wdgm_LocalSupervision


  • LNM_MainFunction makes use of an obsolete API call of the function CheckpointReached. The static code shall be updated removing the argument of the function call, as follows


  • No labels