3. MCAL Configurator User Guide¶
3.1. About This Document¶
Document Title |
Configurator Guide of MCAL Driver |
Document Version |
Version 1.1 |
Company |
Texas Instruments |
Document Name |
MCAL Configurator User Guide |
3.2. Document Revision History¶
Version |
Date |
Revision History |
Status |
---|---|---|---|
1.0 |
05 Aug 2023 |
Initial draft |
Approved |
1.1 |
25 Aug 2023 |
Release Version removed. |
Approved |
1.2 |
14 Feb 2024 |
EPWM module added |
Approved |
3.3. Table of contents¶
3.4. Acronyms and Definitions¶
Acronyms and Definitions used are presented in below table.
Acronym |
Meaning |
|
---|---|---|
AUTOSAR |
Automotive Open Standards Architecture |
|
CCS |
Texas Instruments Code Composer Studio |
|
BSW |
Basic Software in AUTOSAR stack |
|
EB |
Elektrobit |
|
ECU |
Electronic Control Unit |
|
ECU PD |
ECU Parameter Definition |
|
ECU CD |
ECU Configuration Description |
|
EVM |
Evaluation Module, hardware platform containing the Texas Instruments M4 |
|
TI |
Texas Instruments |
|
MCAL |
Microcontroller Abstraction Layer |
|
BSW |
Basic Software |
|
DET |
Default Error Tracer |
|
DEM |
Diagnostic Event Manager |
|
MCU |
Micro Controller Unit |
|
OS |
Operating System |
|
API |
Application Programming Interface |
|
HW |
Hardware |
|
SW |
Software |
|
ISR |
Interrupt Service Routine |
|
INT |
Interrupt |
|
CDD |
Complex Device Driver |
|
ADC |
Analogue Digital Converter |
|
CAN |
Control Area Network |
|
DIO |
Digital Input Output |
|
DMA |
Direct Memory Access |
|
ETH |
Ethernet |
|
ETHTRCV |
Ethernet Transceiver |
|
FLS |
Flash |
|
GPT |
General Purpose Timer |
|
ICU |
Input Capture Unit |
|
PWM |
Pulse Width Modulation |
|
EPWM | Enhanced Pulse Width Modulation |
||
IPC | Inter Process Communication |
||
I2C |
Inter Integrated Circuit |
|
UART |
Universal Asynchronous Reciever Transmitter |
|
SPI |
Serial Pheripheral Interface |
|
LIN |
Local Interconnect Network |
|
FSI |
Fast Serial Interface |
|
Tx |
Transmitter |
|
Rx |
Reciever |
3.5. Introduction¶
The purpose of this User Guide is to provide detailed information regarding the usage of TI Sitara MCU MCAL configurator/generator package. The Microcontroller abstraction layer (MCAL) is the lowest layer of the AUTOSAR Basic Software architecture. The figure below shows MCAL layer in the AUTOSAR BSW software stack.
Figure 1: AUTOSAR architecture.
Each MCAL driver has a driver implementation portion and a configurator/generator portion. The configurator/generator portion is described in this user guide.
MCAL generator/configurator steps in the standard AUTOSAR ECU configuration flow is circled below.
Figure 2: Ecu_configurator.
The TI MCAL configurator/generator package uses Elektrobit Tresos for the MCAL configuration and code generation.
This TI MCAL module’s ECU parameter definition is captured in Elektrobit xdm format.
This TI MCAL modules are delivered in the form of EB tresos plugins.
This configuration of the MCAL modules can be done using the Elektrobit Tresos Configuration Editor.
Once the configuration is complete, code generation for precompile, link time config and postbuild configuration is done using the EB tresos code generation feature.
This TI MCAL delivery is on AM263 platform.
3.5.1. Supported Devices/Platforms¶
This release supports AM263 series of SoC.
3.5.2. Other Documentation¶
Document
|
Description
|
---|---|
2.1_Studio_documentation_users_guide.pdf
|
EB tresos user guide. This document should be used to understand how to use EB tresos for configuration and code generation. |
EB_tresos_installation_guide.pdf
|
Installation Guide for EB tresos. |
LicensingUsersGuide.pdf
|
Guide related to activating EB license and use of EB Client License Administrator tool. |
fnp_LicAdmin.pdf
|
Document from Flexnet explaining usage of Flexnet licensing tools |
3.6. MCAL Overview¶
A set of MCAL are included in the package each controlling a specific peripheral. MCAL drivers included are
ADC |
Driver for ADC peripheral. |
DMA |
Driver to transfer data between memory and device. |
MCU |
Driver to control enabling of modules, PLL setting and basic microcontroller initialization. |
PORT |
Driver for control of pinmux. |
SPI |
Spi handler and driver for Serial Peripheral Interfaces: McSPI. |
CAN |
Driver for the on-chip MCAN controller peripheral. |
GPT |
Driver that controls the internal timer of the controller. |
WDG |
Driver for controlling the watchdog when controller goes into continuous loop. |
DIO |
Driver to read and write the data from the Channels / Port. |
FLS |
Driver provides services for reading, writing, erasing flash memory for external flash device. |
CDD I2C |
Driver provides services to transmit and Receive data with the external devices. |
ETH |
Driver provides services to transmit and Receive data with the external devices. |
ETHTRCV |
Driver for Physical Layer Transceiver. |
WDG |
Driver for control of Watchdog Timer. |
CDD IPC |
Driver for the inter process communication between the cores. |
PWM |
PWM driver for generating the waveforms with required duty cycle and period. |
ICU |
Driver for input capture unit. |
UART |
Driver Provides services for reading and writing to/from UART channels and Port/Serial device. |
FSI RX |
Driver provides fast serial data reception service with the external devices. |
FSI TX |
Driver provides fast serial data transmission service with the external devices. |
LIN |
Driver for the on-chip Lin controller peripheral. |
EPWM |
Driver provides the enhanced pulse width modulated signal. |
The MCAL drivers implement the Software specification mentioned in AUTOSAR 4.3.1 release. Each module is an EB tresos plug-in and uses EB tresos for configuration and code generation.
3.6.1. Directory Structure¶
Figure 3: Directory_structure.
Adc_TI_AM263x |
This directory contains the configurator/generator plugin for ADC MCAL. |
Can_TI_AM263x |
This directory contains the configurator/generator plugin for the CAN MCAL. |
Cdd_Dma_TI_AM263x |
This directory contains the configurator/generator plugin for the DMA MCAL. |
Cdd_I2c_TI_AM263x |
This directory contains the configurator/generator plugin for the I2C MCAL. |
Cdd_Ipc_TI_AM263x |
This directory contains the configurator/generator plugin for the IPC MCAL. |
Cdd_Uart_TI_AM263x |
This directory contains the configurator/generator plugin for the UART MCAL. |
Dem_TI_AM263X |
This directory contains the Dem stub for DEM module. |
Dio_TI_AM263X |
This directory contains the configurator/generator plugin for DIO MCAL. |
EcuM_TI_AM263X |
This directory contains the EcuM stub for Ecu Manager module. |
Eth_TI_AM263X |
This directory contains the configurator/generator plugin for ETH MCAL. |
Ethtrcv_TI_AM263X |
This directory contains the configurator/generator plugin for Ethtrcv MCAL. |
FLS_TI_AM263x |
This directory contains the configurator/generator plugin for FLS MCAL. |
Gpt_TI_AM263X |
This directory contains the configurator/generator plugin for GPT MCAL. |
Icu_TI_AM263X |
This directory contains the configurator/generator plugin for ICU MCAL. |
Mcu_TI_AM263X |
This directory contains the configurator/generator plugin for MCU MCAL. |
Os_TI_AM263X |
This directory contains the Os stub for Os services module. |
Port_TI_AM263X |
This directory contains the configurator/generator plugin for PORT MCAL. |
Pwm_TI_AM263X |
This directory contains the configurator/generator plugin for the Pwm MCAL. |
Spi_TI_AM263X |
This directory contains the configurator/generator plugin for Spi Handler Driver. |
Wdg_TI_AM263X |
This directory contains the configurator/generator plugin for Wdg module. |
Cdd_FsiRx_TI_AM263x |
This directory contains the configurator/generator plugin for Fsi Rx MCAL. |
Cdd_FsiTx_TI_AM263X |
This directory contains the configurator/generator plugin for Fsi Tx MCAL. |
Lin_TI_AM263x |
This directory contains the configurator/generator plugin for Lin MCAL. |
Cdd_PWM_TI_AM263x |
This directory contains the configurator/generator plugin for EPWM MCAL. |
In each folder the contents are described below:
<Module>/config/<Mod >.xdm – ECU Parameter definition for the MCAL module.
<Module>/config_ext/<Mod>_Rec.xdm – Recommended values of ECU Configuration Description for the MCAL module.
<Module>/generate/include/<Mod>_Cfg.h – EB tresos template file for precompile config header file generation.
<Module>/generate/src/<Mod>_Lcfg.c or <Module>/generate/src/<Mod>_PBcfg.c – EB tresos template file for link/postbuild config C file generation
3.7. Installation¶
To install MCAL Configurator package on your PC, install ‘mcal_config_setupwin32_xx_xx_xx_xx.exe’ as admin by Right clicking on that installer and selecting ‘Run as administrator’. The installer allows you to choose the installation directory. The MCAL includes several sub-components, and all the components will be installed in the same location (e.g., “ C:/ti/ mcal_config_xx_xx_xx_xx”).
After installation you should see the following directory structure:
Figure 4: EbTresos Directory.
3.7.1. Elektrobit Tresos Installation¶
The following steps need to be followed to install EB Tresos:
Acquire a node-locked single user/eval license on machine where you are going to use EB tresos.
Install EB Client License Administrator 1.2.4:
Unzip archive Elektrobit/installer/EB_24_ClientLicenseAdmin_CommandDownload2018-05-30.7z
From the extracted folder launch EB_Client_License_Administrator_1_2_4_Setup.exe as administrator.
On successful installation you should see icon “EB Client License Administrator 1.2.4” on your desktop.
Launch EB Client License Administrator 1.2.4.
Enter the activation key provided to you by TI FAE. If you have not got the activation key please contact your TI FAE.
Click on “Activate” button.
Check the status of the license activation sequence. If successful your license is ready to use.
For details refer Elektrobit/docs/LicensingUsersGuide.pdf Chapter 5.
Figure 5: License Administrator.
Unzip archive Elektrobit/installer/EB_24_Installer_CommandDownload2018-03-27.7z
From the extracted folder launch EB setup by selecting setup.exe as administrator. Refer Chapter 1 (Installing EB tresos studio) of EB_tresos_Installation_guide for details.
Click Install on below window.
Figure 6: EbTresos Installer.
After installation, launch “tresos Studio 24.0” and confirm you are able to open EB tresos without any license failure errors.
3.7.2. Elektrobit Tresos License Troubleshooting¶
If after successful license activation using “EB Client License Administrator” you still face issue with license, please check the following:
Check if “FlexNet Licensing Service” service is started in your Windows Service Manager Panel (Control Panel -> Administrative Tools -> Services). If it is not starter manually start it.
Disable any Anti-Virus software on your machine.
If not possible to disable Anti- Virus, add user defined exceptions in Anti- Virus software to the following folders:
C:/ProgramData/Flexnet/*
C:/EB/*
If you continue to face license error issues, contact EB support via Help->EB tresos support in EB tresos.
3.7.3. TI MCAL configurator plug-in installation¶
Close any open Ebtresos instances.
Copy the contents of mcal_config_xx_xx_xx_xx/plugins folder to <EB_Tresos_Installation_Base>/plugins
3.7.4. TI MCAL generator verification¶
Launch EB tresos studio 24.0. Click on Start icon.
Figure 7: EBTresos Welcome Page.
Click File->New ->Configuration Project
Figure 8: Configuration Page.
Enter the following:
Project Name: TI Mcal Config (Click Next)
Figure 10: Project creation.
ECU ID: AM263_MCAL
Target: ARM/AM263x from dropdown menu (Click Next)
Figure 10: Target selection.
Select all plugins listed. You should see all MCAL modules listed.
Confirm “Default Recommended Configuration” is selected in Recommended Configuration.
Click Finish.
Figure 11: Module Configuration.
Project should be created with all the TI MCAL modules listed as individual packages.
Figure 12: Project Explorer.
Right Click on project and choose “Verify Project”. You should see 0 errors.
Right Click on project and choose “Generate Project”. You should see 0 errors. You should see the generated precompile, post build files under output/ folder in the project.
Figure 12: Code generator.
Ignore any warnings related to PARALLEL GENERATOR license.
If you are successfully able to generate the files, your setup is ready for use. Refer 2.1_Studio_documentation_users_guide for details on how to configure AUTOSAR modules using EB tresos studio.
3.8. Working with Command Line¶
To start the command line
Open the Windows command prompt.
Change into the directory, into which you have installed EB tresos Studio; e.g. C:/EB/tresos.
Change into the bin subdirectory.
You can execute a command by using tresos_cmd.bat; e.g., type tresos_cmd.bat –help to see a short help for the command line options.
Commands for legacy code generation
EB tresos Studio supports legacy mode. This mode worksindependently from projects. Use Recommended setting xdmfiles as input present in config_input/”Module”_TI_AM263x/config_ext/.
Command to generate code is as follows. E.g
“C:/EB/tresos/bin/tresos_cmd_64.bat” -Decuid=AM263 -Dtarget=ARM - Dderivate=AM263 legacy generate -n Can -g Can_TI_AM263x -o “output directory to store output” config_input/ Can_TI_AM263x /config_ext/Can_Rec.xdm
Options description:
-Decuid - This option specifiesthe Idof the imported ECU.
-Dtarget - Defines the target architecture
-Dderivate - Defines the target’s derivate
-n - Specifies the name of the module configurations of the configuration files to load
-g – Module Id -o - Sets the directory to which the generated files are written.
3.9. Tool versions¶
The EB tresos version shipped as part of TI MCAL package is v24.0
3.10. Hardware Setup¶
List of hardware required.
AM263EVM
3.11. Un-installing¶
Refer EB tresos documentation for details on how to uninstall EB tresos. The MCAL installer installs the un- installer in <install path> directory. The name of the un-installer is uninstall.exe. To uninstall these packages, please run the uninstaller.
3.12. References¶
AUTOSAR Specification 4.3.1
AM263EVM
EB tresos License user guide
EB tresos studio user guide