4.17. MCU Module
4.17.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.17.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.17.3. Functional Overview
4.17.3.1. MCU Driver Architecture
The MCU driver has architecture as shown in below figure from the AUTOSAR spec.

Fig. 4.80 MCU in AUTOSAR architecture

Fig. 4.81 Interface of MCU
4.17.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.17.3.3. States
No state is maintained in the MCU driver
4.17.3.4. Assumptions
None
4.17.3.5. Limitations
None
4.17.3.6. Design overview
Will be updated in future release
4.17.4. Hardware Features
4.17.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.17.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.17.4.3. Not supported Features
Support to activate the MCU power modes
Cross Bar not supported: PWMXBAR, DMAXBAR, OUTPUTXBAR, PWMSYNCOUTXBAR.
4.17.4.4. Non compliance
4.17.4.4.1. Deviations to requirements (Requirement Traceability)
4.17.4.4.1.1. Deviation of requirements against AUTOSAR specification requirements
Will be updated in next release
4.17.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.82 MCU header file include structure
4.17.6. Module requirements
Please refer Software Product Specification document provided as part of CSP.
4.17.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.17.6.2. Scheduling
4.17.6.2.1. SchM
Beside the OS the BSW Scheduler provides functions that module MCU calls at begin and end of critical sections.
4.17.6.2.2. Critical Sections
There is only one kind of critical sections in MCU driver. Within these sections all read /modify / write accesses to internal MCU status variables must be protected. This is handled internally in the MCU driver by invoking SchM_Enter_Mcu_MCU_EXCLUSIVE_AREA_0()/SchM_Exit_Mcu_MCU_EXCLUSIVE_AREA_0().
4.17.6.3. Error handling
4.17.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.17.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.17.7. Used resources
4.17.7.1. Interrupt Handling
The MCU module doesn’t implement any Interrupt Service Routines.
4.17.8. Integration description
4.17.8.1. Dependent modules
4.17.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.17.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.17.8.1.3. Callback Notification
There are no Callback Notifications.
4.17.8.2. Multi-core and Resource allocator
Will be updated in the next release
4.17.9. Configuration
The MCU can be configured as Post-Build or Pre-Compile variant, using EB tresos tool.
Variants |
Configured Files |
---|---|
PostBuild |
Mcu_PBcfg.c , Mcu_Cfg.h |
Pre-Compile |
Mcu_Cfg.c , Mcu_Cfg.h |
4.17.9.1. Parameter Description
4.17.9.1.1. Standard Configuration
Standard Parameters |
Description |
Default Value |
Range |
Unit/Datatype |
---|---|---|---|---|
McuDevErrorDetect |
Pre-processor switch for enabling the development error detection and reporting. |
TRUE |
TRUE FALSE |
Boolean |
McuGetRamStateApi |
Pre-processor switch to enable/disable the API Mcu_GetRamState |
TRUE |
TRUE FALSE |
Boolean |
McuInitClock |
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. |
TRUE |
TRUE FALSE |
Boolean |
McuNoPll |
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 |
TRUE |
TRUE FALSE |
Boolean |
McuPerformResetApi |
Pre-processor switch to enable / disable the use of the function Mcu_PerformReset() |
FALSE |
TRUE FALSE |
Boolean |
McuVersionInfoApi |
Pre-processor switch to enable / disable the API to read out the modules version information |
TRUE |
TRUE FALSE |
Boolean |
McuClockSrcFailureNotification |
Enables/Disables clock failure notification. In case this feature is not supported by HW the setting should be disabled. |
DISABLED |
DISABLED ENABLED |
Enumeration |
McuNumberOfMcuModes |
This parameter shall represent the number of Modes available for the MCU |
Will be calculated |
1..255 |
Integer |
McuRamSectors |
This parameter shall represent the number of RAM sectors available for the MCU |
Will be calculated |
1..4294967295 |
Integer |
McuResetSetting |
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. |
5 |
1..255 |
Integer |
McuClockSettingId |
The Id of this McuClockSettingConfig to be used as argument for the API call Mcu_InitClock. |
200 |
0..255 |
Integer |
McuClockReferencePointFrequency |
This is the frequency for the specific instance of the McuClockReferencePoint container. It shall be given in Hz. |
1 |
0..Inifinity |
Float |
McuMode |
The parameter represents the MCU Mode settings. |
200 |
0..255 |
Integer |
McuRamDefaultValue |
This parameter shall represent the Data pre-setting to be initialized |
0 |
0..255 |
Integer |
McuRamSectionBaseAddress |
This parameter shall represent the MCU RAM section base address |
1879048192 |
0..4294967295 |
Integer |
McuRamSectionSize |
This parameter represents the MCU RAM Section size in bytes |
256 |
0..4294967295 |
Integer |
McuRamSectionWriteSize |
This parameter shall define the size in bytes of data which can be written into RAM at once |
8 |
0..4294967295 |
Integer |
McuResetReason |
The parameter represents the different type of reset that a Micro supports. This parameter is referenced by the parameter EcuMResetReason in the ECU State manager module. |
Will be calculated |
0..255 |
Integer |
MCU_E_CLOCK_FAILURE |
Reference to configured DEM event to report Clock source failure |
Ref. from DEM module |
NA |
Symbolic name Reference |
4.17.9.1.2. IP Specific Configuration
Standard Parameters |
Description |
Default Value |
Range |
Unit/Datatype |
---|---|---|---|---|
McuIntrCrossbarEnable |
Pre-processor switch for enabling the Mcu Interrupt Crossbar. |
FALSE |
TRUE FALSE |
Boolean |
McuInputCrossbarEnable |
Pre-processor switch for enabling the Mcu Input Crossbar. |
FALSE |
TRUE FALSE |
Boolean |
McuInitRamApi |
Pre-processor switch to enable / disable the API to initialize RAM section. |
TRUE |
TRUE FALSE |
Boolean |
McuRegisterReadbackApi |
Pre-processor switch to enable / disable the API to read MCU registers. |
TRUE |
TRUE FALSE |
Boolean |
McuDefaultOSCounterId |
Default Os Counter Id if node reference to OsCounter ref McuOsCounterRef is not set |
0 |
0..16 |
Integer |
McuTimeoutDuration |
MCU timeout |
32000 |
1..4294967295 |
Integer |
McuResetMode |
Reset mode enum which can be used in Mcu_PerformReset |
MCU_PERFORM_RESET_MODE_WARM |
MCU_PERFORM_RESET_MODE_COLD MCU_PERFORM_RESET_MODE_WARM |
Enumeration |
McuClockModuleId |
Module Id for which clock setting to be applied |
MCU_CLKSRC_MODULE_ID_MCAN0 |
MCU_CLKSRC_MODULE_ID_MCAN0 MCU_CLKSRC_MODULE_ID_MCAN1 MCU_CLKSRC_MODULE_ID_MCAN2 MCU_CLKSRC_MODULE_ID_MCAN3 MCU_CLKSRC_MODULE_ID_MCAN4 MCU_CLKSRC_MODULE_ID_MCAN5 MCU_CLKSRC_MODULE_ID_MCAN6 MCU_CLKSRC_MODULE_ID_MCAN7 MCU_CLKSRC_MODULE_ID_RTI0 MCU_CLKSRC_MODULE_ID_RTI1 MCU_CLKSRC_MODULE_ID_RTI2 MCU_CLKSRC_MODULE_ID_RTI3 MCU_CLKSRC_MODULE_ID_RTI4 MCU_CLKSRC_MODULE_ID_RTI5 MCU_CLKSRC_MODULE_ID_RTI6 MCU_CLKSRC_MODULE_ID_RTI7 MCU_CLKSRC_MODULE_ID_WDT0 MCU_CLKSRC_MODULE_ID_WDT1 MCU_CLKSRC_MODULE_ID_WDT2 MCU_CLKSRC_MODULE_ID_WDT3 MCU_CLKSRC_MODULE_ID_OSPI MCU_CLKSRC_MODULE_ID_MCSPI0 MCU_CLKSRC_MODULE_ID_MCSPI1 MCU_CLKSRC_MODULE_ID_MCSPI2 MCU_CLKSRC_MODULE_ID_MCSPI3 MCU_CLKSRC_MODULE_ID_MCSPI4 MCU_CLKSRC_MODULE_ID_MCSPI5 MCU_CLKSRC_MODULE_ID_MCSPI6 MCU_CLKSRC_MODULE_ID_MCSPI7 MCU_CLKSRC_MODULE_ID_I2C MCU_CLKSRC_MODULE_ID_SCI0 MCU_CLKSRC_MODULE_ID_SCI1 MCU_CLKSRC_MODULE_ID_SCI2 MCU_CLKSRC_MODULE_ID_SCI3 MCU_CLKSRC_MODULE_ID_SCI4 MCU_CLKSRC_MODULE_ID_SCI5 MCU_CLKSRC_MODULE_ID_CPTS MCU_CLKSRC_MODULE_ID_PMIC_CLKOUT MCU_CLKSRC_MODULE_ID_MCU_CLKOUT0 MCU_CLKSRC_MODULE_ID_MCU_CLKOUT1 MCU_CLKSRC_MODULE_ID_MII100_CLK MCU_CLKSRC_MODULE_ID_MII10_CLK MCU_CLKSRC_MODULE_ID_RGMI_CLK MCU_CLKSRC_MODULE_ID_CONTROLSS_CLK |
Enumeration |
McuClockSourceId |
Clock source Id for selected module |
MCU_CLKSRC_0 |
MCU_CLKSRC_0 MCU_CLKSRC_1 MCU_CLKSRC_2 MCU_CLKSRC_3 MCU_CLKSRC_4 MCU_CLKSRC_5 MCU_CLKSRC_6 MCU_CLKSRC_7 |
Enumeration |
McuClockDivId |
Clock divider id for the module |
3 |
0..255 |
Integer |
McuClockInitializationConfigFlag |
Switch for enabling and disabling clock of the modules |
TRUE |
TRUE FALSE |
Boolean |
McuInterruptChannelXbar |
Interrupt Cross Bar |
MCU_INTRXBAR0_OUT_0 |
(Refer section :ref: |
Enumeration |
McuInterruptChannelXbarMap |
Interrupt Cross BarMap |
MCU_INT_XBAR_EPWM0_INT |
(Refer section :ref: |
Enumeration |
McuInputChannelXbar |
Input Cross Bar |
MCU_INPUT_XBAR0_OUT_0 |
(Refer section :ref: |
Enumeration |
McuInputChannelXbarMap |
Input Cross BarMap |
MCU_INPUT_XBAR_GPIO0 |
(Refer section :ref: |
Enumeration |
McuGpioIntrXbar |
GPIO xbar Interrupt |
MCU_GPIO_0 |
(Refer section :ref: |
Enumeration |
McuGpioXbarOutMap |
Gpio xbar output pin mapping |
MCU_GPIO_INT_XBAR_VIM_MODULE0_0 |
(Refer section :ref: |
Enumeration |
McuPwmChannelId |
PwmChannelId |
Ref. from PWM module |
NA |
Symbolic name Reference |
McuPwmGroupId |
PwmGroupId |
Ref. from PWM module |
NA |
Symbolic name Reference |
McuAdcHWUnitId |
AdcHwUnit |
Ref. from ADC module |
NA |
Symbolic name Reference |
MCU_E_MODE_FAILURE |
Reference to the DemEventParameter which shall be issued when the error has occurred |
Ref. from DEM module |
NA |
Symbolic name Reference |
MCU_E_HARDWARE_ERROR |
Reference to the DemEventParameter which shall be issued when the error has occurred |
Ref. from DEM module |
NA |
Symbolic name Reference |
McuDeviceVariant |
Select SOC variant. This parameter shall be used by driver to impose device specific constraints. |
AM263Px |
AM263Px |
Enumeration |
McuPllTimeoutDuration |
PLL timeout - used in Pll initialization. Unit is in clock ticks. Configure the timeout according to r5f clock frequency(400MHz/200MHz) |
6600 |
1..4294967295 |
Integer |
McuOsCounterRef |
This parameter contains a reference to the OsCounter, which is used by the MCU driver |
NA |
NA |
NA |
CddPwmChannelId |
CDD PWM Channel ID |
Ref. from CDD PWM module |
NA |
Symbolic name Reference |
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.17.9.2. Symbolic Names deviations
None
4.17.9.3. Configuration rules and constraints to enable plausibility checks
Will be updated in future release
4.17.10. Examples
4.17.10.1. Overview
Will be updated in the next release
4.17.10.2. Hardware Software Setup and Tools
None
4.17.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.17.10.4. Configuration used to test this example
MCU module will initialize the clock for configured modules.
McuRamSectionBaseAddress is configured with ‘zero’ and reference array is also configured with default value of RAM section.
After configuration, 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.17.10.5. 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.17.10.6. 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.17.11. FAQ’s
None
4.17.12. Test Report
Please refer AM26x MCU Driver Test Case Report as part of CSP provided in the release package.