4.19. MCU Module
4.19.1. Acronyms and Definitions
Abbreviation/Term |
Explanation |
---|---|
AUTOSAR |
Automotive Open System Architecture |
BSW |
Basic Software |
GPIO |
General Purpose Input Output |
MCAL |
Micro Controller Abstraction Layer |
API |
Application Programming Interface |
DET |
Default Error Tracer |
HW |
Hardware |
SW |
Software |
I/O |
Input/Output |
ADC |
Analog to Digital Convertor |
PWM |
Pulse Width Modulation |
MCU |
Micro Controller Unit |
PLL |
Phase Locked Loop |
OS |
Operating System |
4.19.2. Introduction
This document describes MCAL MCU Driver functionality and configuration details as per AUTOSAR version 4.3.1 .
Supported AUTOSAR Release |
4.3.1 |
---|---|
Supported Configuration Variants |
Pre-Compile, Post-build |
Vendor ID |
MCU_VENDOR_ID (44) |
Module ID |
MCU_MODULE_ID (101) |
Supported Platform |
AM263Px |
The MCU driver provides services for basic microcontroller initialization, reset and microcontroller specific functions required by other MCAL software modules.
The MCU driver provides MCU services for Clock and RAM initialization. In the MCU configuration set, the MCU specific settings for the Clock (i.e. PLL setting) and RAM (i.e. section base address and size) shall be configured.
4.19.3. Functional Overview
4.19.3.1. MCU Driver Architecture
The MCU driver has architecture as shown in below figure from the AUTOSAR spec.

Fig. 4.81 MCU in AUTOSAR architecture

Fig. 4.82 Interface of MCU
4.19.3.2. Initialization
Mcu_Init() initializes the MCU driver and does module enable for the configured module ids.
To enable PLL, MCU_NO_PLL should be kept STD_OFF and generate, so that it will generate PLL configuration required in Mcu_Cfg.h and Mcu_PBcfg.c/Mcu_Cfg.c. Refer to figure below :

For AM263Px, configuration settings are as shown below:
Core_Pll shall be set for 2000MHz and is divided into three HSDIV values such as:
DPLL_CORE_HSDIV0_CLKOUT0: 400MHz, DPLL_CORE_HSDIV0_CLKOUT1: 500MHz, DPLL_CORE_HSDIV0_CLKOUT2: 400MHz , where DPLL_CORE_HSDIV0_CLKOUT0(400MHz) will be given to core.
Refer to figure below :

Per_Pll shall be set for 1920MHz and is divided into two HSDIV values such as:
DPLL_PER_HSDIV0_CLKOUT0: 160MHz and DPLL_PER_HSDIV0_CLKOUT1: 192MHz
Refer to figure below :

ADC:
MCU powers the ADC module. The ADC module depends on MCU module for data buffer control and crossbar interrupt mapping of ADC interrupts depending on the Hardware unit being configured. Suppose the Hardware Unit 1 and Hardware Unit 3 are configured for ADC module:

Then, the MCU module container “McuAdcConfiguration” should be configured as shown in below figure:


Interrupt Crossbar(ADC):
MCU is also enabling Interrupt crossbar and Input crossbar in Mcu_Init(). Similarly, the crossbar interrupts also needs to be mapped in MCU module according to HW unit and interrupts being required. The ADC interrupts needs to be mapped to the corresponding cross bar interrupt required. Please refer limitation section of Interrupts to be configured for ADC as per “AdcPriorityImplementation” in ADC user guide.


PWM:
MCU also powers the PWM module. The PWM module depends on MCU module to enable PWM Channel and crossbar interrupt mapping of PWM interrupts depending on the Hardware unit being configured. Suppose the PWM channel 0 is configured for PWM module as shown in figure:

Then, the MCU module container “McuPwmConfiguration” should be configured as shown in below figure:


Interrupt Crossbar(PWM):
The crossbar interrupts needs to be mapped in MCU module according to PWM channel configured. The PWM interrupts needs to be mapped to the corresponding cross bar interrupt.


The interrupt cross bar generates the functions in “Mcu_IntXbar” in Mcu_PBcfg.c as per the user configuration from configurator as shown in below figure:

Input Crossbar:
Input Crossbar can be configured from MCU as per following figure:


As per user configuration, input crossbars APIs will be generated in Mcu_PBcfg.c as in figure.

MCU Crossbar Details - AM263Px:
McuInterruptChannelXbar |
McuInterruptChannelXbarMap |
McuInputChannelXbar |
McuInputChannelXbarMap |
McuGpioIntrXbar |
McuGpioXbarOutMap |
---|---|---|---|---|---|
MCU_INTRXBAR0_OUT_0 |
MCU_INT_XBAR_EPWM0_INT |
MCU_INPUT_XBAR0_OUT_0 |
MCU_INPUT_XBAR_GPIO1 |
MCU_GPIO_0 |
MCU_GPIO_INT_XBAR_ICSS_XBAR_0 |
MCU_INTRXBAR0_OUT_1 |
MCU_INT_XBAR_EPWM1_INT |
MCU_INPUT_XBAR0_OUT_1 |
MCU_INPUT_XBAR_GPIO2 |
MCU_GPIO_1 |
MCU_GPIO_INT_XBAR_ICSS_XBAR_1 |
MCU_INTRXBAR0_OUT_2 |
MCU_INT_XBAR_EPWM2_INT |
MCU_INPUT_XBAR0_OUT_2 |
MCU_INPUT_XBAR_GPIO3 |
MCU_GPIO_2 |
MCU_GPIO_INT_XBAR_ICSS_XBAR_2 |
MCU_INTRXBAR0_OUT_3 |
MCU_INT_XBAR_EPWM3_INT |
MCU_INPUT_XBAR0_OUT_3 |
MCU_INPUT_XBAR_GPIO4 |
MCU_GPIO_3 |
MCU_GPIO_INT_XBAR_ICSS_XBAR_3 |
MCU_INTRXBAR0_OUT_4 |
MCU_INT_XBAR_EPWM4_INT |
MCU_INPUT_XBAR0_OUT_4 |
MCU_INPUT_XBAR_GPIO5 |
MCU_GPIO_4 |
MCU_GPIO_INT_XBAR_DMA_TRIG_XBAR_0 |
MCU_INTRXBAR0_OUT_5 |
MCU_INT_XBAR_EPWM5_INT |
MCU_INPUT_XBAR0_OUT_5 |
MCU_INPUT_XBAR_GPIO6 |
MCU_GPIO_5 |
MCU_GPIO_INT_XBAR_DMA_TRIG_XBAR_1 |
MCU_INTRXBAR0_OUT_6 |
MCU_INT_XBAR_EPWM6_INT |
MCU_INPUT_XBAR0_OUT_6 |
MCU_INPUT_XBAR_GPIO7 |
MCU_GPIO_6 |
MCU_GPIO_INT_XBAR_DMA_TRIG_XBAR_2 |
MCU_INTRXBAR0_OUT_7 |
MCU_INT_XBAR_EPWM7_INT |
MCU_INPUT_XBAR0_OUT_7 |
MCU_INPUT_XBAR_GPIO8 |
MCU_GPIO_7 |
MCU_GPIO_INT_XBAR_DMA_TRIG_XBAR_3 |
MCU_INTRXBAR0_OUT_8 |
MCU_INT_XBAR_EPWM8_INT |
MCU_INPUT_XBAR0_OUT_8 |
MCU_INPUT_XBAR_GPIO9 |
MCU_GPIO_8 |
MCU_GPIO_INT_XBAR_SOC_TIMESYNC_XBAR1_0 |
MCU_INTRXBAR0_OUT_9 |
MCU_INT_XBAR_EPWM9_INT |
MCU_INPUT_XBAR0_OUT_9 |
MCU_INPUT_XBAR_GPIO10 |
MCU_GPIO_9 |
MCU_GPIO_INT_XBAR_SOC_TIMESYNC_XBAR1_1 |
MCU_INTRXBAR0_OUT_10 |
MCU_INT_XBAR_EPWM10_INT |
MCU_INPUT_XBAR0_OUT_10 |
MCU_INPUT_XBAR_GPIO11 |
MCU_GPIO_10 |
MCU_GPIO_INT_XBAR_SOC_TIMESYNC_XBAR1_2 |
MCU_INTRXBAR0_OUT_11 |
MCU_INT_XBAR_EPWM11_INT |
MCU_INPUT_XBAR0_OUT_11 |
MCU_INPUT_XBAR_GPIO12 |
MCU_GPIO_11 |
MCU_GPIO_INT_XBAR_SOC_TIMESYNC_XBAR1_3 |
MCU_INTRXBAR0_OUT_12 |
MCU_INT_XBAR_EPWM12_INT |
MCU_INPUT_XBAR0_OUT_12 |
MCU_INPUT_XBAR_GPIO13 |
MCU_GPIO_12 |
MCU_GPIO_INT_XBAR_SOC_TIMESYNC_XBAR1_4 |
MCU_INTRXBAR0_OUT_13 |
MCU_INT_XBAR_EPWM13_INT |
MCU_INPUT_XBAR0_OUT_13 |
MCU_INPUT_XBAR_GPIO14 |
MCU_GPIO_13 |
MCU_GPIO_INT_XBAR_SOC_TIMESYNC_XBAR1_5 |
MCU_INTRXBAR0_OUT_14 |
MCU_INT_XBAR_EPWM14_INT |
MCU_INPUT_XBAR0_OUT_14 |
MCU_INPUT_XBAR_GPIO15 |
MCU_GPIO_14 |
MCU_GPIO_INT_XBAR_VIM_MODULE0_0 |
MCU_INTRXBAR0_OUT_15 |
MCU_INT_XBAR_EPWM15_INT |
MCU_INPUT_XBAR0_OUT_15 |
MCU_INPUT_XBAR_GPIO16 |
MCU_GPIO_15 |
MCU_GPIO_INT_XBAR_VIM_MODULE0_1 |
MCU_INTRXBAR0_OUT_16 |
MCU_INT_XBAR_EPWM16_INT |
MCU_INPUT_XBAR0_OUT_16 |
MCU_INPUT_XBAR_GPIO17 |
MCU_GPIO_16 |
MCU_GPIO_INT_XBAR_VIM_MODULE0_2 |
MCU_INTRXBAR0_OUT_17 |
MCU_INT_XBAR_EPWM17_INT |
MCU_INPUT_XBAR0_OUT_17 |
MCU_INPUT_XBAR_GPIO18 |
MCU_GPIO_17 |
MCU_GPIO_INT_XBAR_VIM_MODULE0_3 |
MCU_INTRXBAR0_OUT_18 |
MCU_INT_XBAR_EPWM18_INT |
MCU_INPUT_XBAR0_OUT_18 |
MCU_INPUT_XBAR_GPIO19 |
MCU_GPIO_18 |
MCU_GPIO_INT_XBAR_VIM_MODULE1_0 |
MCU_INTRXBAR0_OUT_19 |
MCU_INT_XBAR_EPWM19_INT |
MCU_INPUT_XBAR0_OUT_19 |
MCU_INPUT_XBAR_GPIO20 |
MCU_GPIO_19 |
MCU_GPIO_INT_XBAR_VIM_MODULE1_1 |
MCU_INTRXBAR0_OUT_20 |
MCU_INT_XBAR_EPWM20_INT |
MCU_INPUT_XBAR0_OUT_20 |
MCU_INPUT_XBAR_GPIO21 |
MCU_GPIO_20 |
MCU_GPIO_INT_XBAR_VIM_MODULE1_2 |
MCU_INTRXBAR0_OUT_21 |
MCU_INT_XBAR_EPWM21_INT |
MCU_INPUT_XBAR0_OUT_21 |
MCU_INPUT_XBAR_GPIO22 |
MCU_GPIO_21 |
MCU_GPIO_INT_XBAR_VIM_MODULE1_3 |
MCU_INTRXBAR0_OUT_22 |
MCU_INT_XBAR_EPWM22_INT |
MCU_INPUT_XBAR0_OUT_22 |
MCU_INPUT_XBAR_GPIO23 |
MCU_GPIO_22 |
MCU_GPIO_INT_XBAR_VIM_MODULE2_0 |
MCU_INTRXBAR0_OUT_23 |
MCU_INT_XBAR_EPWM23_INT |
MCU_INPUT_XBAR0_OUT_23 |
MCU_INPUT_XBAR_GPIO24 |
MCU_GPIO_23 |
MCU_GPIO_INT_XBAR_VIM_MODULE2_1 |
MCU_INTRXBAR0_OUT_24 |
MCU_INT_XBAR_EPWM24_INT |
MCU_INPUT_XBAR0_OUT_24 |
MCU_INPUT_XBAR_GPIO25 |
MCU_GPIO_24 |
MCU_GPIO_INT_XBAR_VIM_MODULE2_2 |
MCU_INTRXBAR0_OUT_25 |
MCU_INT_XBAR_EPWM25_INT |
MCU_INPUT_XBAR0_OUT_25 |
MCU_INPUT_XBAR_GPIO26 |
MCU_GPIO_25 |
MCU_GPIO_INT_XBAR_VIM_MODULE2_3 |
MCU_INTRXBAR0_OUT_26 |
MCU_INT_XBAR_EPWM26_INT |
MCU_INPUT_XBAR0_OUT_26 |
MCU_INPUT_XBAR_GPIO27 |
MCU_GPIO_26 |
MCU_GPIO_INT_XBAR_VIM_MODULE3_0 |
MCU_INTRXBAR0_OUT_27 |
MCU_INT_XBAR_EPWM27_INT |
MCU_INPUT_XBAR0_OUT_27 |
MCU_INPUT_XBAR_GPIO28 |
MCU_GPIO_27 |
MCU_GPIO_INT_XBAR_VIM_MODULE3_1 |
MCU_INTRXBAR0_OUT_28 |
MCU_INT_XBAR_EPWM28_INT |
MCU_INPUT_XBAR0_OUT_28 |
MCU_INPUT_XBAR_GPIO29 |
MCU_GPIO_28 |
MCU_GPIO_INT_XBAR_VIM_MODULE3_2 |
MCU_INTRXBAR0_OUT_29 |
MCU_INT_XBAR_EPWM29_INT |
MCU_INPUT_XBAR0_OUT_29 |
MCU_INPUT_XBAR_GPIO30 |
MCU_GPIO_29 |
MCU_GPIO_INT_XBAR_VIM_MODULE3_3 |
MCU_INTRXBAR0_OUT_30 |
MCU_INT_XBAR_EPWM30_INT |
MCU_INPUT_XBAR0_OUT_30 |
MCU_INPUT_XBAR_GPIO31 |
MCU_GPIO_30 |
|
MCU_INTRXBAR0_OUT_31 |
MCU_INT_XBAR_EPWM31_INT |
MCU_INPUT_XBAR0_OUT_31 |
MCU_INPUT_XBAR_GPIO32 |
MCU_GPIO_31 |
|
MCU_INT_XBAR_EPWM0_TZINT |
MCU_INPUT_XBAR_GPIO33 |
MCU_GPIO_32 |
|||
MCU_INT_XBAR_EPWM1_TZINT |
MCU_INPUT_XBAR_GPIO34 |
MCU_GPIO_33 |
|||
MCU_INT_XBAR_EPWM2_TZINT |
MCU_INPUT_XBAR_GPIO35 |
MCU_GPIO_34 |
|||
MCU_INT_XBAR_EPWM3_TZINT |
MCU_INPUT_XBAR_GPIO36 |
MCU_GPIO_35 |
|||
MCU_INT_XBAR_EPWM4_TZINT |
MCU_INPUT_XBAR_GPIO37 |
MCU_GPIO_36 |
|||
MCU_INT_XBAR_EPWM5_TZINT |
MCU_INPUT_XBAR_GPIO38 |
MCU_GPIO_37 |
|||
MCU_INT_XBAR_EPWM6_TZINT |
MCU_INPUT_XBAR_GPIO39 |
MCU_GPIO_38 |
|||
MCU_INT_XBAR_EPWM7_TZINT |
MCU_INPUT_XBAR_GPIO40 |
MCU_GPIO_39 |
|||
MCU_INT_XBAR_EPWM8_TZINT |
MCU_INPUT_XBAR_GPIO41 |
MCU_GPIO_40 |
|||
MCU_INT_XBAR_EPWM9_TZINT |
MCU_INPUT_XBAR_GPIO42 |
MCU_GPIO_41 |
|||
MCU_INT_XBAR_EPWM10_TZINT |
MCU_INPUT_XBAR_GPIO43 |
MCU_GPIO_42 |
|||
MCU_INT_XBAR_EPWM11_TZINT |
MCU_INPUT_XBAR_GPIO44 |
MCU_GPIO_43 |
|||
MCU_INT_XBAR_EPWM12_TZINT |
MCU_INPUT_XBAR_GPIO45 |
MCU_GPIO_44 |
|||
MCU_INT_XBAR_EPWM13_TZINT |
MCU_INPUT_XBAR_GPIO46 |
MCU_GPIO_45 |
|||
MCU_INT_XBAR_EPWM14_TZINT |
MCU_INPUT_XBAR_GPIO47 |
MCU_GPIO_46 |
|||
MCU_INT_XBAR_EPWM15_TZINT |
MCU_INPUT_XBAR_GPIO48 |
MCU_GPIO_47 |
|||
MCU_INT_XBAR_EPWM16_TZINT |
MCU_INPUT_XBAR_GPIO49 |
MCU_GPIO_48 |
|||
MCU_INT_XBAR_EPWM17_TZINT |
MCU_INPUT_XBAR_GPIO50 |
MCU_GPIO_49 |
|||
MCU_INT_XBAR_EPWM18_TZINT |
MCU_INPUT_XBAR_GPIO51 |
MCU_GPIO_50 |
|||
MCU_INT_XBAR_EPWM19_TZINT |
MCU_INPUT_XBAR_GPIO52 |
MCU_GPIO_51 |
|||
MCU_INT_XBAR_EPWM20_TZINT |
MCU_INPUT_XBAR_GPIO53 |
MCU_GPIO_52 |
|||
MCU_INT_XBAR_EPWM21_TZINT |
MCU_INPUT_XBAR_GPIO54 |
MCU_GPIO_53 |
|||
MCU_INT_XBAR_EPWM22_TZINT |
MCU_INPUT_XBAR_GPIO55 |
MCU_GPIO_54 |
|||
MCU_INT_XBAR_EPWM23_TZINT |
MCU_INPUT_XBAR_GPIO56 |
MCU_GPIO_55 |
|||
MCU_INT_XBAR_EPWM24_TZINT |
MCU_INPUT_XBAR_GPIO57 |
MCU_GPIO_56 |
|||
MCU_INT_XBAR_EPWM25_TZINT |
MCU_INPUT_XBAR_GPIO58 |
MCU_GPIO_57 |
|||
MCU_INT_XBAR_EPWM26_TZINT |
MCU_INPUT_XBAR_GPIO59 |
MCU_GPIO_58 |
|||
MCU_INT_XBAR_EPWM27_TZINT |
MCU_INPUT_XBAR_GPIO60 |
MCU_GPIO_59 |
|||
MCU_INT_XBAR_EPWM28_TZINT |
MCU_INPUT_XBAR_GPIO61 |
MCU_GPIO_60 |
|||
MCU_INT_XBAR_EPWM29_TZINT |
MCU_INPUT_XBAR_GPIO62 |
MCU_GPIO_61 |
|||
MCU_INT_XBAR_EPWM30_TZINT |
MCU_INPUT_XBAR_GPIO63 |
MCU_GPIO_62 |
|||
MCU_INT_XBAR_EPWM31_TZINT |
MCU_INPUT_XBAR_GPIO64 |
MCU_GPIO_63 |
|||
MCU_INT_XBAR_ADC0_INT1 |
MCU_INPUT_XBAR_GPIO65 |
MCU_GPIO_64 |
|||
MCU_INT_XBAR_ADC0_INT2 |
MCU_INPUT_XBAR_GPIO66 |
MCU_GPIO_65 |
|||
MCU_INT_XBAR_ADC0_INT3 |
MCU_INPUT_XBAR_GPIO67 |
MCU_GPIO_66 |
|||
MCU_INT_XBAR_ADC0_INT4 |
MCU_INPUT_XBAR_GPIO68 |
MCU_GPIO_67 |
|||
MCU_INT_XBAR_ADC0_EVTINT |
MCU_INPUT_XBAR_GPIO69 |
MCU_GPIO_68 |
|||
MCU_INT_XBAR_ADC1_INT1 |
MCU_INPUT_XBAR_GPIO70 |
MCU_GPIO_69 |
|||
MCU_INT_XBAR_ADC1_INT2 |
MCU_INPUT_XBAR_GPIO71 |
MCU_GPIO_70 |
|||
MCU_INT_XBAR_ADC1_INT3 |
MCU_INPUT_XBAR_GPIO72 |
MCU_GPIO_71 |
|||
MCU_INT_XBAR_ADC1_INT4 |
MCU_INPUT_XBAR_GPIO73 |
MCU_GPIO_72 |
|||
MCU_INT_XBAR_ADC1_EVTINT |
MCU_INPUT_XBAR_GPIO74 |
MCU_GPIO_73 |
|||
MCU_INT_XBAR_ADC2_INT1 |
MCU_INPUT_XBAR_GPIO75 |
MCU_GPIO_74 |
|||
MCU_INT_XBAR_ADC2_INT2 |
MCU_INPUT_XBAR_GPIO76 |
MCU_GPIO_75 |
|||
MCU_INT_XBAR_ADC2_INT3 |
MCU_INPUT_XBAR_GPIO77 |
MCU_GPIO_76 |
|||
MCU_INT_XBAR_ADC2_INT4 |
MCU_INPUT_XBAR_GPIO78 |
MCU_GPIO_77 |
|||
MCU_INT_XBAR_ADC2_EVTINT |
MCU_INPUT_XBAR_GPIO79 |
MCU_GPIO_78 |
|||
MCU_INT_XBAR_ADC3_INT1 |
MCU_INPUT_XBAR_GPIO80 |
MCU_GPIO_79 |
|||
MCU_INT_XBAR_ADC3_INT2 |
MCU_INPUT_XBAR_GPIO81 |
MCU_GPIO_80 |
|||
MCU_INT_XBAR_ADC3_INT3 |
MCU_INPUT_XBAR_GPIO82 |
MCU_GPIO_81 |
|||
MCU_INT_XBAR_ADC3_INT4 |
MCU_INPUT_XBAR_GPIO83 |
MCU_GPIO_82 |
|||
MCU_INT_XBAR_ADC3_EVTINT |
MCU_INPUT_XBAR_GPIO84 |
MCU_GPIO_83 |
|||
MCU_INT_XBAR_ADC4_INT1 |
MCU_INPUT_XBAR_GPIO85 |
MCU_GPIO_84 |
|||
MCU_INT_XBAR_ADC4_INT2 |
MCU_INPUT_XBAR_GPIO86 |
MCU_GPIO_85 |
|||
MCU_INT_XBAR_ADC4_INT3 |
MCU_INPUT_XBAR_GPIO87 |
MCU_GPIO_86 |
|||
MCU_INT_XBAR_ADC4_INT4 |
MCU_INPUT_XBAR_GPIO88 |
MCU_GPIO_87 |
|||
MCU_INT_XBAR_ADC4_EVTINT |
MCU_INPUT_XBAR_GPIO89 |
MCU_GPIO_88 |
|||
MCU_INT_XBAR_FSIRX0_INT1N |
MCU_INPUT_XBAR_GPIO90 |
MCU_GPIO_89 |
|||
MCU_INT_XBAR_FSIRX0_INT2N |
MCU_INPUT_XBAR_GPIO91 |
MCU_GPIO_90 |
|||
MCU_INT_XBAR_FSIRX1_INT1N |
MCU_INPUT_XBAR_GPIO92 |
MCU_GPIO_91 |
|||
MCU_INT_XBAR_FSIRX1_INT2N |
MCU_INPUT_XBAR_GPIO93 |
MCU_GPIO_92 |
|||
MCU_INT_XBAR_FSIRX2_INT1N |
MCU_INPUT_XBAR_GPIO94 |
MCU_GPIO_93 |
|||
MCU_INT_XBAR_FSIRX2_INT2N |
MCU_INPUT_XBAR_GPIO95 |
MCU_GPIO_94 |
|||
MCU_INT_XBAR_FSIRX3_INT1N |
MCU_INPUT_XBAR_GPIO96 |
MCU_GPIO_95 |
|||
MCU_INT_XBAR_FSIRX3_INT2N |
MCU_INPUT_XBAR_GPIO97 |
MCU_GPIO_96 |
|||
MCU_INT_XBAR_FSITX0_INT1N |
MCU_INPUT_XBAR_GPIO98 |
MCU_GPIO_97 |
|||
MCU_INT_XBAR_FSITX0_INT2N |
MCU_INPUT_XBAR_GPIO99 |
MCU_GPIO_98 |
|||
MCU_INT_XBAR_FSITX1_INT1N |
MCU_INPUT_XBAR_GPIO100 |
MCU_GPIO_99 |
|||
MCU_INT_XBAR_FSITX1_INT2N |
MCU_INPUT_XBAR_GPIO101 |
MCU_GPIO_100 |
|||
MCU_INT_XBAR_FSITX2_INT1N |
MCU_INPUT_XBAR_GPIO102 |
MCU_GPIO_101 |
|||
MCU_INT_XBAR_FSITX2_INT2N |
MCU_INPUT_XBAR_GPIO103 |
MCU_GPIO_102 |
|||
MCU_INT_XBAR_FSITX3_INT1N |
MCU_INPUT_XBAR_GPIO104 |
MCU_GPIO_103 |
|||
MCU_INT_XBAR_FSITX3_INT2N |
MCU_INPUT_XBAR_GPIO105 |
MCU_GPIO_104 |
|||
MCU_INT_XBAR_SD0_ERR |
MCU_INPUT_XBAR_GPIO106 |
MCU_GPIO_105 |
|||
MCU_INT_XBAR_SD0_FILT0_DRINT |
MCU_INPUT_XBAR_GPIO107 |
MCU_GPIO_106 |
|||
MCU_INT_XBAR_SD0_FILT1_DRINT |
MCU_INPUT_XBAR_GPIO108 |
MCU_GPIO_107 |
|||
MCU_INT_XBAR_SD0_FILT2_DRINT |
MCU_INPUT_XBAR_GPIO109 |
MCU_GPIO_108 |
|||
MCU_INT_XBAR_SD0_FILT3_DRINT |
MCU_INPUT_XBAR_GPIO110 |
MCU_GPIO_109 |
|||
MCU_INT_XBAR_SD1_ERR |
MCU_INPUT_XBAR_GPIO111 |
MCU_GPIO_110 |
|||
MCU_INT_XBAR_SD1_FILT0_DRINT |
MCU_INPUT_XBAR_GPIO112 |
MCU_GPIO_111 |
|||
MCU_INT_XBAR_SD1_FILT1_DRINT |
MCU_INPUT_XBAR_GPIO113 |
MCU_GPIO_112 |
|||
MCU_INT_XBAR_SD1_FILT2_DRINT |
MCU_INPUT_XBAR_GPIO114 |
MCU_GPIO_113 |
|||
MCU_INT_XBAR_SD1_FILT3_DRINT |
MCU_INPUT_XBAR_GPIO115 |
MCU_GPIO_114 |
|||
MCU_INT_XBAR_ECAP0_INT |
MCU_INPUT_XBAR_GPIO116 |
MCU_GPIO_115 |
|||
MCU_INT_XBAR_ECAP1_INT |
MCU_INPUT_XBAR_GPIO117 |
MCU_GPIO_116 |
|||
MCU_INT_XBAR_ECAP2_INT |
MCU_INPUT_XBAR_GPIO118 |
MCU_GPIO_117 |
|||
MCU_INT_XBAR_ECAP3_INT |
MCU_INPUT_XBAR_GPIO119 |
MCU_GPIO_118 |
|||
MCU_INT_XBAR_ECAP4_INT |
MCU_INPUT_XBAR_GPIO120 |
MCU_GPIO_119 |
|||
MCU_INT_XBAR_ECAP5_INT |
MCU_INPUT_XBAR_GPIO121 |
MCU_GPIO_120 |
|||
MCU_INT_XBAR_ECAP6_INT |
MCU_INPUT_XBAR_GPIO122 |
MCU_GPIO_121 |
|||
MCU_INT_XBAR_ECAP7_INT |
MCU_INPUT_XBAR_GPIO123 |
MCU_GPIO_122 |
|||
MCU_INT_XBAR_ECAP8_INT |
MCU_INPUT_XBAR_GPIO124 |
MCU_GPIO_123 |
|||
MCU_INT_XBAR_ECAP9_INT |
MCU_INPUT_XBAR_GPIO125 |
MCU_GPIO_124 |
|||
MCU_INT_XBAR_ECAP10_INT |
MCU_INPUT_XBAR_GPIO126 |
MCU_GPIO_125 |
|||
MCU_INT_XBAR_ECAP11_INT |
MCU_INPUT_XBAR_GPIO127 |
MCU_GPIO_126 |
|||
MCU_INT_XBAR_ECAP12_INT |
MCU_INPUT_XBAR_GPIO128 |
MCU_GPIO_127 |
|||
MCU_INT_XBAR_ECAP13_INT |
MCU_INPUT_XBAR_GPIO129 |
MCU_GPIO_128 |
|||
MCU_INT_XBAR_ECAP14_INT |
MCU_INPUT_XBAR_GPIO130 |
MCU_GPIO_129 |
|||
MCU_INT_XBAR_ECAP15_INT |
MCU_INPUT_XBAR_GPIO131 |
MCU_GPIO_130 |
|||
MCU_INT_XBAR_EQEP0_INT |
MCU_INPUT_XBAR_GPIO132 |
MCU_GPIO_131 |
|||
MCU_INT_XBAR_EQEP1_INT |
MCU_INPUT_XBAR_GPIO133 |
MCU_GPIO_132 |
|||
MCU_INT_XBAR_EQEP2_INT |
MCU_INPUT_XBAR_GPIO134 |
MCU_GPIO_133 |
|||
MCU_INPUT_XBAR_GPIO135 |
MCU_GPIO_134 |
||||
MCU_INPUT_XBAR_GPIO136 |
MCU_GPIO_135 |
||||
MCU_INPUT_XBAR_GPIO137 |
MCU_GPIO_136 |
||||
MCU_INPUT_XBAR_GPIO138 |
MCU_GPIO_137 |
||||
MCU_INPUT_XBAR_GPIO139 |
MCU_GPIO_138 |
||||
MCU_INPUT_XBAR_GPIO140 |
MCU_GPIO_139 |
||||
MCU_INPUT_XBAR_GPIO141 |
MCU_GPIO_0_BANK_INTR_0 |
||||
MCU_INPUT_XBAR_GPIO142 |
MCU_GPIO_0_BANK_INTR_1 |
||||
MCU_INPUT_XBAR_GPIO143 |
MCU_GPIO_0_BANK_INTR_2 |
||||
MCU_INPUT_XBAR_ICSSGPO0_PORT0 |
MCU_GPIO_0_BANK_INTR_3 |
||||
MCU_INPUT_XBAR_ICSSGPO1_PORT0 |
MCU_GPIO_0_BANK_INTR_4 |
||||
MCU_INPUT_XBAR_ICSSGPO2_PORT0 |
MCU_GPIO_0_BANK_INTR_5 |
||||
MCU_INPUT_XBAR_ICSSGPO3_PORT0 |
MCU_GPIO_0_BANK_INTR_6 |
||||
MCU_INPUT_XBAR_ICSSGPO4_PORT0 |
MCU_GPIO_0_BANK_INTR_7 |
||||
MCU_INPUT_XBAR_ICSSGPO5_PORT0 |
MCU_GPIO_0_BANK_INTR_8 |
||||
MCU_INPUT_XBAR_ICSSGPO6_PORT0 |
MCU_GPIO_1_BANK_INTR_0 |
||||
MCU_INPUT_XBAR_ICSSGPO7_PORT0 |
MCU_GPIO_1_BANK_INTR_1 |
||||
MCU_INPUT_XBAR_ICSSGPO8_PORT0 |
MCU_GPIO_1_BANK_INTR_2 |
||||
MCU_INPUT_XBAR_ICSSGPO9_PORT0 |
MCU_GPIO_1_BANK_INTR_3 |
||||
MCU_INPUT_XBAR_ICSSGPO10_PORT0 |
MCU_GPIO_1_BANK_INTR_4 |
||||
MCU_INPUT_XBAR_ICSSGPO11_PORT0 |
MCU_GPIO_1_BANK_INTR_5 |
||||
MCU_INPUT_XBAR_ICSSGPO12_PORT0 |
MCU_GPIO_1_BANK_INTR_6 |
||||
MCU_INPUT_XBAR_ICSSGPO13_PORT0 |
MCU_GPIO_1_BANK_INTR_7 |
||||
MCU_INPUT_XBAR_ICSSGPO14_PORT0 |
MCU_GPIO_1_BANK_INTR_8 |
||||
MCU_INPUT_XBAR_ICSSGPO15_PORT0 |
MCU_GPIO_2_BANK_INTR_0 |
||||
MCU_INPUT_XBAR_ICSSGPO0_PORT1 |
MCU_GPIO_2_BANK_INTR_1 |
||||
MCU_INPUT_XBAR_ICSSGPO1_PORT1 |
MCU_GPIO_2_BANK_INTR_2 |
||||
MCU_INPUT_XBAR_ICSSGPO2_PORT1 |
MCU_GPIO_2_BANK_INTR_3 |
||||
MCU_INPUT_XBAR_ICSSGPO3_PORT1 |
MCU_GPIO_2_BANK_INTR_4 |
||||
MCU_INPUT_XBAR_ICSSGPO4_PORT1 |
MCU_GPIO_2_BANK_INTR_5 |
||||
MCU_INPUT_XBAR_ICSSGPO5_PORT1 |
MCU_GPIO_2_BANK_INTR_6 |
||||
MCU_INPUT_XBAR_ICSSGPO6_PORT1 |
MCU_GPIO_2_BANK_INTR_7 |
||||
MCU_INPUT_XBAR_ICSSGPO7_PORT1 |
MCU_GPIO_2_BANK_INTR_8 |
||||
MCU_INPUT_XBAR_ICSSGPO8_PORT1 |
MCU_GPIO_3_BANK_INTR_0 |
||||
MCU_INPUT_XBAR_ICSSGPO9_PORT1 |
MCU_GPIO_3_BANK_INTR_1 |
||||
MCU_INPUT_XBAR_ICSSGPO10_PORT1 |
MCU_GPIO_3_BANK_INTR_2 |
||||
MCU_INPUT_XBAR_ICSSGPO11_PORT1 |
MCU_GPIO_3_BANK_INTR_3 |
||||
MCU_INPUT_XBAR_ICSSGPO12_PORT1 |
MCU_GPIO_3_BANK_INTR_4 |
||||
MCU_INPUT_XBAR_ICSSGPO13_PORT1 |
MCU_GPIO_3_BANK_INTR_5 |
||||
MCU_INPUT_XBAR_ICSSGPO14_PORT1 |
MCU_GPIO_3_BANK_INTR_6 |
||||
MCU_INPUT_XBAR_ICSSGPO15_PORT1 |
MCU_GPIO_3_BANK_INTR_7 |
||||
MCU_GPIO_3_BANK_INTR_8 |
4.19.3.3. States
No state is maintained in the MCU driver
4.19.3.4. Assumptions
None
4.19.3.5. Limitations
None
4.19.3.6. Design overview
Will be updated in future release
4.19.4. Hardware Features
4.19.4.1. Hardware Features supported
Initialization of Core clock, PLL Clock and peripheral clocks.
Initialization of RAM sections.
Activation of a µC reset.
Provides a service to get the reset reason from hardware.
ADC & PWM Enable from MCU.
Cross Bar supported: INPUTXBAR, INTXBAR.
4.19.4.2. AUTOSAR Features supported
Initialization of MCU clock, PLL, clock prescalers and MCU clock distribution.
MCU Reset/Read Reset Reason.
Core PLL and Peripheral PLL Supported.
Support to get the lock status of the PLL.
4.19.4.3. Not supported Features
Support to activate the MCU power modes
Cross Bar not supported: PWMXBAR, DMAXBAR, OUTPUTXBAR, PWMSYNCOUTXBAR.
4.19.4.4. Non compliance
4.19.4.4.1. Deviations to requirements (Requirement Traceability)
4.19.4.4.1.1. Deviation of requirements against AUTOSAR specification requirements
Will be updated in next release
4.19.5. Source files
Static source C Files are defined below
📦AM263Px
┣ 📂build
┣ 📂mcal
┃ ┣ 📂Mcu
┃ ┃ ┣ 📂include
┃ ┃ ┃ ┣ 📜Mcu.h : Contains the API’s of the Mcu driver to be used by upper layers.
┃ ┃ ┣ 📂src
┃ ┃ ┃ ┣ 📜Mcu.c : Contains the implementation of the API’s for Mcu driver.
┃ ┃ ┣ 📂V2
┃ ┃ ┃ ┗ 📜Mcu_Priv.c : Contains Functions that support the API’s for Mcu driver
┃ ┃ ┃ ┣ 📜Mcu_Priv.h : Contains data structures and Internal function declarations.
┃ ┃ ┃ ┗ 📜Mcu_Xbar.h : Contains Macros for Interrupt and Input crossbar and function declarations.
┃ ┃ ┗ 📜Makefile
┃ 📂mcal_config
┃ 📂mcal_docs
┃ 📜README.txt
Plugin files are defined below in the table.
Plugin Files |
Description |
---|---|
Mcu_Cfg.h |
Contains the Precompile switches, Symbolic names of McuClockSettingConfig |
Mcu_PBcfg.c |
Contains all Post-Build Configured parameters |
Mcu_Cfg.c |
Contains all Pre-Compile Configured parameters |

Fig. 4.83 MCU header file include structure
4.19.6. Module requirements
Please refer Software Product Specification document provided as part of CSP.
4.19.6.1. Memory Mapping
Memory Mapping Sections |
MCU_CODE |
MCU_DATA |
MCU_PBCFG |
---|---|---|---|
MCU_START_SEC_VAR_INIT_UNSPECIFIED(.bss) |
x |
||
MCU_STOP_SEC_VAR_INIT_UNSPECIFIED |
x |
||
MCU_START_SEC_CODE(.text) |
x |
||
MCU_STOP_SEC_CODE |
x |
||
MCU_START_SEC_CONFIG_DATA(.data) |
x |
||
MCU_STOP_SEC_CONFIG_DATA |
x |
4.19.6.2. Scheduling
There are no scheduled functions within the MCU driver.
4.19.6.3. Error handling
4.19.6.3.1. Development Error Reporting (DET)
The errors reported to DET module are described in the following table:
Type of Error |
Related Error code |
Value (Hex) |
---|---|---|
API service called with incorrect configuration parameter |
MCU_E_PARAM_CONFIG |
0x0A |
API service called with invalid clock id |
MCU_E_PARAM_CLOCK |
0x0B |
API service called with invalid mode id |
MCU_E_PARAM_MODE |
0x0C |
API service called with invalid ram section parameter |
MCU_E_PARAM_RAMSECTION |
0x0D |
DET error reported when PLL is not locked |
MCU_E_PLL_NOT_LOCKED |
0x0E |
API service used without module initialization |
MCU_E_UNINIT |
0x0F |
API service called with NULL_PTR passed to MCU driver APIs |
MCU_E_PARAM_POINTER |
0x10 |
4.19.6.3.2. DEM Errors
The extended production errors reported to DEM module are described in the following table:
Type of Error |
Related Error Code |
Description |
---|---|---|
Assigned by DEM |
MCU_E_CLOCK_FAILURE |
This error is raised when there is an MCU Clock Source Failure |
Note: MCU_E_MODE_FAILURE should be always disabled. Since Mcu_SetMode is not supported, MCU_E_MODE_FAILURE should always be disabled.
4.19.7. Used resources
4.19.7.1. Interrupt Handling
The MCU module doesn’t implement any Interrupt Service Routines.
4.19.8. Integration description
4.19.8.1. Dependent modules
4.19.8.1.1. DET
The module MCU depends on the DET (by default) in order to report development errors. Detection and reporting of development errors can be enabled or disabled by the switch MCU_DEV_ERROR_DETECT = STD_ON in the Mcu_Cfg.h
AUTOSAR requires that API functions shall check the validity of their respective parameters. These checks are for development error reporting and can be enabled or disabled.
4.19.8.1.2. DEM
By default, production code related errors are reported to the DEM using the service DEM_ReportErrorStatus().
Note: Dem Event is enable only if $(Module_Name)DemEventParameterRefs
is enabled.
4.19.8.1.3. Callback Notification
There are no Callback Notifications.
4.19.8.1.4. SchM
If multiple AUTOSAR runnables have access to the same Data Store Memory block, the exported AUTOSAR specification enforces data consistency by using an AUTOSAR exclusive area. With this specification, the runnables have mutually exclusive access to the per-instance memory global data, which prevents data corruption. Beside the OS, the BSW Scheduler provides functions that MCU module calls at begin and end of critical sections. This implementation requires 1 level of exclusive access to guard critical sections.
The data consistency mechanism that has to be applied to an ExclusiveArea might be domain, ECU or even project specific. The decision which mechanism has to be applied by RTE / Basic Software Scheduler is taken during ECU integration by setting the Exclusive Area configuration parameter RteExclusiveAreaImplMechanism. This parameter is an input for RTE generator. For MCU Module, data consistency and exclusive access to critical sections are required for the following sections as shown in the table below:
Exclusive Area Functions used |
MCU Function calling Exclusive Area |
Need for Exclusive Area |
Recommended Exclusive Area Mapping |
---|---|---|---|
MCU_EXCLUSIVE_AREA_0 |
Mcu_PerformReset |
To protect against multiple access for shared resources |
ALL_INTERRUPT_BLOCKING : All interrupts should be blocked as this API’s can be called in the interrupts |
4.19.8.2. Multi-core support
Not supported
4.19.9. Configuration
4.19.9.1. McuGeneralConfiguration
This container contains the configuration (parameters) of the MCU driver.
4.19.9.1.1. McuDevErrorDetect
Item |
|
---|---|
Name |
McuDevErrorDetect |
Description |
Pre-processor switch for enabling the development error detection and reporting. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
true |
4.19.9.1.2. McuIntrCrossbarEnable
Item |
|
---|---|
Name |
McuIntrCrossbarEnable |
Description |
Pre-processor switch for enabling the Mcu Interrupt Crossbar. |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
false |
4.19.9.1.3. McuInputCrossbarEnable
Item |
|
---|---|
Name |
McuInputCrossbarEnable |
Description |
Pre-processor switch for enabling the Mcu Input Crossbar. |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
false |
4.19.9.1.4. McuGetRamStateApi
Item |
|
---|---|
Name |
McuGetRamStateApi |
Description |
Pre-processor switch to enable/disable the API Mcu_GetRamState. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
true |
4.19.9.1.5. McuInitClock
Item |
|
---|---|
Name |
McuInitClock |
Description |
If this parameter is set to FALSE, the clock initialization has to be disabled from the MCU driver. This concept applies when there are some write once clock registers and a bootloader is present. If this parameter is set to TRUE, the MCU driver is responsible of the clock initialization. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
true |
4.19.9.1.6. McuNoPll
Item |
|
---|---|
Name |
McuNoPll |
Description |
This parameter shall be set True, if the H/W does not have a PLL or the PLL circuitry is enabled after the power on without S/W intervention. In this case MCU_DistributePllClock has to be disabled and MCU_GetPllStatus has to return MCU_PLL_STATUS_UNDEFINED. Otherwise this parameters has to be set False |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
true |
4.19.9.1.7. McuPerformResetApi
Item |
|
---|---|
Name |
McuPerformResetApi |
Description |
Pre-processor switch to enable / disable the use of the function Mcu_PerformReset() |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
false |
4.19.9.1.8. McuVersionInfoApi
Item |
|
---|---|
Name |
McuVersionInfoApi |
Description |
Pre-processor switch to enable / disable the API to read out the modules version information. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
true |
4.19.9.1.9. McuInitRamApi
Item |
|
---|---|
Name |
McuInitRamApi |
Description |
Pre-processor switch to enable / disable the API to initialize RAM section. |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
true |
4.19.9.1.10. McuRegisterReadbackApi
Item |
|
---|---|
Name |
McuRegisterReadbackApi |
Description |
Pre-processor switch to enable / disable the API to read MCU registers. |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
true |
4.19.9.1.11. McuDefaultOSCounterId
Item |
|
---|---|
Name |
McuDefaultOSCounterId |
Description |
Default Os Counter Id if node reference to OsCounter ref McuOsCounterRef is not set |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
0 |
Max-value |
16 |
Min-value |
0 |
4.19.9.1.12. McuTimeoutDuration
Item |
|
---|---|
Name |
McuTimeoutDuration |
Description |
MCU timeout |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
32000 |
Max-value |
4294967295 |
Min-value |
1 |
4.19.9.1.13. McuPllTimeoutDuration
Item |
|
---|---|
Name |
McuPllTimeoutDuration |
Description |
PLL timeout - used in Pll initialization. Unit is in clock ticks. Configure the timeout according to r5f clock frequency(400MHz/200MHz) |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
6600 |
Max-value |
4294967295 |
Min-value |
1 |
4.19.9.1.14. McuOsCounterRef
Item |
|
---|---|
Name |
McuOsCounterRef |
Description |
This parameter contains a reference to the OsCounter, which is used by the MCU driver. |
Multiplicity-Configuration-Class |
– |
Post-Build Time |
VARIANT-POST-BUILD |
Pre-Compile Time |
VARIANT-PRE-COMPILE |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
4.19.9.2. McuModuleConfiguration
This container contains the configuration (parameters) of the MCU driver
4.19.9.2.1. McuClockSrcFailureNotification
Item |
|
---|---|
Name |
McuClockSrcFailureNotification |
Description |
Enables/Disables clock failure notification. In case this feature is not supported by HW the setting should be disabled. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
DISABLED |
Range |
DISABLED |
4.19.9.2.2. McuNumberOfMcuModes
Item |
|
---|---|
Name |
McuNumberOfMcuModes |
Description |
This parameter shall represent the number of Modes available for the MCU. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Max-value |
255 |
Min-value |
1 |
4.19.9.2.3. McuRamSectors
Item |
|
---|---|
Name |
McuRamSectors |
Description |
This parameter shall represent the number of RAM sectors available for the MCU. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
1 |
Max-value |
4294967295 |
Min-value |
1 |
4.19.9.2.4. McuResetSetting
Item |
|
---|---|
Name |
McuResetSetting |
Description |
This parameter relates to the MCU specific reset configuration. This applies to the function Mcu_PerformReset, which performs a microcontroller reset using the hardware feature of the microcontroller. |
Multiplicity-Configuration-Class |
– |
Post-Build Time |
VARIANT-POST-BUILD |
Pre-Compile Time |
VARIANT-PRE-COMPILE |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
5 |
Max-value |
255 |
Min-value |
1 |
4.19.9.2.5. McuResetMode
Item |
|
---|---|
Name |
McuResetMode |
Description |
Reset mode enum which can be used in Mcu_PerformReset |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
MCU_PERFORM_RESET_MODE_WARM |
Range |
MCU_PERFORM_RESET_MODE_WARM |
4.19.9.2.6. McuClockSettingConfig
This container contains the configuration (parameters) for the Clock settings of the MCU. Please see MCU031 for more information on the MCU clock settings.
4.19.9.2.6.1. McuClockSettingId
Item |
|
---|---|
Name |
McuClockSettingId |
Description |
The Id of this McuClockSettingConfig to be used as argument for the API call “Mcu_InitClock”. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
200 |
Max-value |
255 |
Min-value |
0 |
4.19.9.2.6.2. McuClockModuleId
Item |
|
---|---|
Name |
McuClockModuleId |
Description |
ModuleId for which clock setting to be applied. |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
MCU_CLKSRC_MODULE_ID_MCAN0 |
Range |
MCU_CLKSRC_MODULE_ID_MCAN0 |
4.19.9.2.6.3. McuClockSourceId
Item |
|
---|---|
Name |
McuClockSourceId |
Description |
Clock source Id for selected module |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
MCU_CLKSRC_0 |
Range |
MCU_CLKSRC_0 |
4.19.9.2.6.4. McuClockDivId
Item |
|
---|---|
Name |
McuClockDivId |
Description |
McuClockDivider value should be less than or equal to 255 as per hardware limitation for MII10 and it should be less than or equal to 15 for all other modules. |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
3 |
Max-value |
255 |
Min-value |
0 |
4.19.9.2.6.5. McuClockInitializationConfigFlag
Item |
|
---|---|
Name |
McuClockInitializationConfigFlag |
Description |
Switch for enabling and disabling clock of the modules |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Post-Build-Time |
VARIANT-POST-BUILD |
Default-value |
true |
4.19.9.2.7. McuClockReferencePoint
This container defines a reference point in the Mcu Clock tree. It defines the frequency which then can be used by other modules as an input value. Lower multiplicity is 1, as even in the simplest case (only one frequency is used), there is one frequency to be defined.
4.19.9.2.7.1. McuClockReferencePointFrequency
Item |
|
---|---|
Name |
McuClockReferencePointFrequency |
Description |
This is the frequency for the specific instance of the McuClockReferencePoint container. It shall be given in Hz. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
1.0 |
Max-value |
INF |
Min-value |
0.0 |
4.19.9.2.8. McuXbarChannelTriggerConfiguration
This container contains the Xbar Channel Trigger condition.
4.19.9.2.8.1. McuInterruptChannelXbar
Item |
|
---|---|
Name |
McuInterruptChannelXbar |
Description |
Cross Bar. |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
MCU_INTRXBAR0_OUT_0 |
Range |
MCU_INTRXBAR0_OUT_0 |
4.19.9.2.8.2. McuInterruptChannelXbarMap
Item |
|
---|---|
Name |
McuInterruptChannelXbarMap |
Description |
Cross Bar. |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
MCU_INT_XBAR_EPWM0_INT |
Range |
MCU_INT_XBAR_EPWM0_INT |
4.19.9.2.9. McuInputXbarChannelTriggerConfiguration
This container contains the Xbar Channel Trigger condition.
4.19.9.2.9.1. McuInputChannelXbar
Item |
|
---|---|
Name |
McuInputChannelXbar |
Description |
Cross Bar. |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
MCU_INPUT_XBAR0_OUT_0 |
Range |
MCU_INPUT_XBAR0_OUT_0 |
4.19.9.2.9.2. McuInputChannelXbarMap
Item |
|
---|---|
Name |
McuInputChannelXbarMap |
Description |
Cross Bar. |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
MCU_INPUT_XBAR_GPIO0 |
Range |
MCU_INPUT_XBAR_GPIO0 |
4.19.9.2.10. McuGpioXbarIntrConfiguration
This container contains channel/bank selection for each output pin of GPIO_XBAR_INTRTR0 routing module
4.19.9.2.10.1. McuGpioIntrXbar
Item |
|
---|---|
Name |
McuGpioIntrXbar |
Description |
GPIO xbar Intr. |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
MCU_GPIO_0 |
Range |
MCU_GPIO_0 |
4.19.9.2.10.2. McuGpioXbarOutMap
Item |
|
---|---|
Name |
McuGpioXbarOutMap |
Description |
Gpio xbar output pin mapping |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
MCU_GPIO_INT_XBAR_VIM_MODULE0_0 |
Range |
MCU_GPIO_INT_XBAR_ICSS_XBAR_0 |
4.19.9.2.11. McuPwmConfiguration
This container contains the PWM clock configuration.
4.19.9.2.11.1. McuPwmChannelId
Item |
|
---|---|
Name |
McuPwmChannelId |
Description |
PwmChannelId |
Multiplicity-Configuration-Class |
– |
Post-Build Time |
VARIANT-POST-BUILD |
Pre-Compile Time |
VARIANT-PRE-COMPILE |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
4.19.9.2.11.2. McuPwmGroupId
Item |
|
---|---|
Name |
McuPwmGroupId |
Description |
PwmGroupId |
Multiplicity-Configuration-Class |
– |
Post-Build Time |
VARIANT-POST-BUILD |
Pre-Compile Time |
VARIANT-PRE-COMPILE |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
4.19.9.2.12. McuCddPwmConfiguration
This container contains the PWM clock configuration.
4.19.9.2.12.1. McuCddPwmChannelId
Item |
|
---|---|
Name |
McuCddPwmChannelId |
Description |
CddPwmChannelId |
Multiplicity-Configuration-Class |
– |
Post-Build Time |
VARIANT-POST-BUILD |
Pre-Compile Time |
VARIANT-PRE-COMPILE |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
4.19.9.2.13. McuAdcConfiguration
This container contains the ADC buffer control configuration.
4.19.9.2.13.1. McuAdcHWUnitId
Item |
|
---|---|
Name |
McuAdcHWUnitId |
Description |
AdcHwUnit |
Multiplicity-Configuration-Class |
– |
Post-Build Time |
VARIANT-POST-BUILD |
Pre-Compile Time |
VARIANT-PRE-COMPILE |
Origin |
Texas Instruments |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
4.19.9.2.14. McuDemEventParameterRefs
Item |
|
---|---|
Name |
McuDemEventParameterRefs |
Description |
Reference to the DemEventParameter which shall be issued when the error “Timeout on blocking API call occurs “ has occurred. |
Post-build-variant-multiplicity |
false |
Multiplicity-Configuration-Class |
– |
Post-Build Time |
VARIANT-POST-BUILD |
Pre-Compile Time |
VARIANT-PRE-COMPILE |
Origin |
Texas Instruments |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
4.19.9.2.15. McuModeSettingConf
This container contains the configuration (parameters) for the Mode setting of the MCU.
4.19.9.2.15.1. McuMode
Item |
|
---|---|
Name |
McuMode |
Description |
The parameter represents the MCU Mode settings. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
200 |
Max-value |
255 |
Min-value |
0 |
4.19.9.2.16. McuRamSectorSettingConf
This container contains the configuration (parameters) for the RAM Sector setting. Please see MCU030 for more information on RAM sec-tor settings.
4.19.9.2.16.1. McuRamDefaultValue
Item |
|
---|---|
Name |
McuRamDefaultValue |
Description |
This parameter shall represent the Data pre-setting to be initialized |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
0 |
Max-value |
255 |
Min-value |
0 |
4.19.9.2.16.2. McuRamSectionBaseAddress
Item |
|
---|---|
Name |
McuRamSectionBaseAddress |
Description |
This parameter shall represent the MCU RAM section base address |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
1879048192 |
Max-value |
4294967295 |
Min-value |
1 |
4.19.9.2.16.3. McuRamSectionSize
Item |
|
---|---|
Name |
McuRamSectionSize |
Description |
This parameter represents the MCU RAM Section size in bytes. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
256 |
Max-value |
4294967295 |
Min-value |
0 |
4.19.9.2.16.4. McuRamSectionWriteSize
Item |
|
---|---|
Name |
McuRamSectionWriteSize |
Description |
This parameter shall define the size in bytes of data which can be written into RAM at once. |
Origin |
AUTOSAR_ECUC |
Post-build-variant-multiplicity |
false |
Post-Build-Variant-Value |
false |
Value-Configuration-Class |
– |
Post-Build-Time |
VARIANT-POST-BUILD |
Pre-Compile-Time |
VARIANT-PRE-COMPILE |
Default-value |
8 |
Max-value |
4294967295 |
Min-value |
0 |
Note: McuPllTimeoutDuration parameter Value should be passed as number of ticks according to clock frequency. The clock source have changed from RTI timers which used 200MHz clock frequency to R5f timers which uses 400MHz clock frequency, so the timeout values need to be configured accordingly.
4.19.10. Examples
4.19.10.1. Overview
Initialize MCU using Mcu_Init() and McuApp_Startup(). MCU module will initialize the clock for configured modules
Do the Port and Platform initialization using Port_Init() and McuApp_PlatformInit()
McuRamSectionBaseAddress is configured with ‘zero’ and reference array is also configured with default value of RAM section.
Mcu_InitRamSection API is invoked in order to set ‘McuRamSectionBaseAddress’ with default value.
Reference array and McuRamSectionBaseAddress is compared with each other to check whether RAM section is initialized properly or not.
It will also check for reset reason.
Mcu_GetResetReason API’s return value is compared with MCU_POWER_ON_RESET to check the wakeup cause.
4.19.10.2. Hardware Software Setup and Tools
None
4.19.10.3. Steps to build and run example
MCU example application demonstrating the MCAL MCU driver features is in folder <MCAL_ROOT>/examples/Mcu.
This application can be built from the root folder by giving gmake –s mcu_app PLATFORM=am263px.
Once the build is completed we get a binary file, which is loaded in our controller and executed.
4.19.10.4. Example Logs
Mcu_App: Variant - Post Build being used !!!
McuApp: Sample Application - STARTS !!!
Mcu Driver version info:9.1.0
Mcu Driver Module/Driver:101.44
RAM section is initialized properly
Wake up from Power ON
MCU Test Passed!!!
MCU Stack Usage: 808 bytes
4.19.10.5. File Structure
📦AM263Px
┣ 📂build
┣ 📂mcal
┃ ┣ 📂examples
┃ ┃ ┣ 📂Mcu
┃ ┃ ┃ ┣ 📂soc
┃ ┃ ┃ ┣ 📜Makefile
┃ ┃ ┃ ┣ 📜McuApp.c : Contains MCU test example.
┃ ┣ 📂examples_config
┃ ┃ ┣ 📂Mcu_Demo_Cfg
┃ ┃ ┃ ┣ 📂soc
┃ ┃ ┃ ┃ ┣ 📂am263px
┃ ┃ ┃ ┃ ┃ ┣ 📂r5f0_0
┃ ┃ ┃ ┃ ┃ ┃ ┣ 📂include
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ 📜Mcu_Cfg.h : Contains the Precompile switches, Symbolic names of McuClockSettingConfig.
┃ ┃ ┃ ┃ ┃ ┃ ┣ 📂src
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ 📜Mcu_Cfg.c : Contains all Pre-Compile Configured parameters
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ 📜Mcu_PBcfg.c : Contains all Post-Build Configured parameters
┃ 📂mcal_config
┃ 📂mcal_docs
┣ 📜README.txt
Note
Mcu_PBcfg.c and Mcu_Cfg.c will be present if Post-Build config variant is selected, only Mcu_Cfg.c will be present if Pre-Compile variant is selected
4.19.11. FAQ’s
None