4.16. MCU

4.16.1. About This Document

Document Title

User Guide of MCAL MCU Driver

Document Version

Version 1.7

Company

Texas Instruments

Document Name

MCU User Guide

4.16.2. Document Revision History

Version

Date

Revision History

Status

Version 1.0

28 Mar 2022

Initial Version.

Approved

Version 1.1

25 Apr 2022

Performed performance Testing and fixed CAN clock initialization.

Approved

Version 1.2

05 Aug 2022

Updated AM263 to AM263x.

Approved

Version 1.3

23 Dec 2022

MCU Example application testing procedure is added.

Approved

Version 1.4

05 May 2023

Functional Testing, Bug Fixes, PLL implementation, Interrupt Crossbar, Input Crossbar, ADC & PWM functionality enabled in MCU.

Approved

Version 1.4

12 Jun 2023

Updated as per HTML format.

Approved

Version 1.5

25 Aug 2023

Document release version column removed

Approved

Version 1.6

13 Sep 2023

Updated PLL configuration and frequency information.

Approved

Version 1.7

13 Feb 2024

Updated GPIO Crossbar Info, Parameter Description added, Assumptions, Limitations & CDD PWM functionality enabled in MCU.

Approved

4.16.3. Table of contents

  1. Acronyms and Definitions

  2. Functional Overview

  3. Deviations to requirements (Requirement Traceability)

  4. Integration Details

  5. API Description

  6. Configuration Description

  7. Memory Mapping

  8. Memory footprint

  9. Performance

  10. Example Usage

  11. FAQ’s

  12. Test Report

  13. References

  14. TI Disclaimer

4.16.4. Acronyms and Definitions

Acronyms and Definitions used are presented in below table.

Acronyms

Descriptions

BSW

Basic Software

DET

Default Error Tracer

ADC

Analogue Digital Converter

PWM

Pulse Width Modulation

MCU

Micro Controller Unit

OS

Operating System

API

Application Programming Interface

HW

Hardware

SW

Software

PLL

Phase Locked Loop

4.16.5. Functional Overview

4.16.5.1. Brief Overview

This document describes MCAL MCU Driver functionality, its application interfaces 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

AM263x

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.16.5.1.1. MCU Driver Architecture

The MCU driver has architecture as shown in below figure from the AUTOSAR spec.

../_images/mcu_image2.png

Figure 1: MCU in AUTOSAR architecture

../_images/mcu_image3.png

Figure 2: Interface of MCU

4.16.5.1.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 :

../_images/mcu_image6.png

For AM263x, configuration settings are as shown below:

  1. 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 :

../_images/mcu_image25.png
  1. Per_Pll shall be set for 1920MHz and is divided into three HSDIV values such as:

    DPLL_PER_HSDIV0_CLKOUT0: 160MHz and DPLL_PER_HSDIV0_CLKOUT1: 192MHz

Refer to figure below :

../_images/mcu_image26.png

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:

../_images/mcu_image7.png

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

../_images/mcu_image8.png
../_images/mcu_image9.png

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.

../_images/mcu_image10.png
../_images/mcu_image11.png

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:

../_images/mcu_image12.png

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

../_images/mcu_image13.png
../_images/mcu_image14.png

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.

../_images/mcu_image15.png
../_images/mcu_image16.png

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:

../_images/mcu_image17.png

CDD PWM:

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

../_images/mcu_image31.png

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

../_images/mcu_image32.png
../_images/mcu_image33.png

Interrupt Crossbar(CDD PWM):

The crossbar interrupts needs to be mapped in MCU module according to CDD PWM channel configured. The EPWM interrupts needs to be mapped to the corresponding cross bar interrupt.

../_images/mcu_image34.png
../_images/mcu_image35.png
../_images/mcu_image36.png

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:

../_images/mcu_image37.png

Input Crossbar:

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

../_images/mcu_image18.png
../_images/mcu_image19.png

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

../_images/mcu_image20.png

GPIO Crossbar:

GPIO crossbars routing can be done for PORT module from MCU as per following figure:

../_images/mcu_image28.png
../_images/mcu_image29.png

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

../_images/mcu_image30.png

4.16.6. States

No state is maintained in the MCU driver

4.16.6.1. Features Supported and Not Supported

AUTOSAR features:

IP Supported Features

AUTOSAR Supported Features

Not Supported

Initialization of Core clock, PLL Clock and peripheral clocks.

Initialization of MCU clock, PLL, clock prescalers and MCU clock distribution.

Support to activate the MCU power modes

Initialization of RAM sections.

MCU Reset/Read Reset Reason.

Cross Bar not supported: PWMXBAR, DMAXBAR, OUTPUTXBAR, PWMSYNCOUTXBAR.

Activation of a µC reset.

Core PLL and Peripheral PLL Supported.

Provides a service to get the reset reason from hardware.

Support to get the lock status of the PLL.

ADC & PWM Enable from MCU.

Cross Bar supported: INPUTXBAR, INTXBAR.

4.16.6.2. Assumptions

Enabling/disabling of the ECU or uC power supply is not the task of the MCU driver. This is to be handled by the upper layer.

4.16.6.3. Limitations

  1. No power modes supported.

  2. Start-Up Code is not in the scope of the AUTOSAR MCU Driver Module.

  3. The start-up code of the MCU shall be executed after power up and any kind of microcontroller reset.

  4. The start-up code shall perform very basic and microcontroller specific start-up initialization and shall be kept short because the MCU clock and PLL are not yet initialized.

4.16.6.4. Design overview

Please refer SITARA MCU MCAL Architecture Document and AM26x MCAL: MCU Detailed Design Document provided as part of CSP.

4.16.6.5. File Structure

Description of static files is provided below:

Static source and header files

Description

Mcu.h

Contains the API’s of the MCU driver to be used by upper layers.

Mcu.c

Implementation of the API’s for MCU driver.

Mcu_Priv.h

Internal function declarations.

Mcu_Priv.c

Contains Internal Functions Definitions.

Description of generated files is provided below:

Plugin Files

Descriptions

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

../_images/mcu_image21.png

Figure 4: MCU header file include structure

4.16.7. Deviations to requirements (Requirement Traceability)

4.16.7.1. Module Requirements

Please refer Software Product Specification document provided as part of CSP.

4.16.7.2. Deviation of requirements against AUTOSAR specification requirements

Will be updated in future release

4.16.8. Integration Details

4.16.8.1. Dependency on Other Software Modules

4.16.8.1.1. The MCU Driver dependent modules

4.16.8.1.2. Error Handling module

4.16.8.1.2.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.

The errors reported to DET module are described in the following table:

Error Code

Error Macro

Description

[0x0A]

MCU_E_PARAM_CONFIG

API service called with incorrect configuration parameter.

[0x0B]

MCU_E_PARAM_CLOCK

API service called with invalid clock id.

[0x0C]

MCU_E_PARAM_MODE

API service called with invalid mode id.

[0x0D]

MCU_E_PARAM_RAMSECTION

API service called with invalid ramsection parameter.

[0x0E]

MCU_E_PLL_NOT_LOCKED

DET error reported when PLL is not locked.

[0x0F]

MCU_E_UNINIT

API service used without module initialization.

[0x10]

MCU_E_PARAM_POINTER

API service called with NULL_PTR passed to MCU driver APIs.

4.16.8.1.2.2. DEM

Note: Dem Event is enable only if $(Module_Name)DemEventParameterRefs is enabled. The extended production errors reported to DEM module are described in the following table:

Error Code

Error Macro

Description

Assigned by DEM

MCU_E_CLOCK_FAILURE

This error is raised when there is an MCU Clock Source Failure

Assigned by DEM

MCU_E_HARDWARE_ERROR

This error is raised when register write failure occurs. (Hardware 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.16.8.1.2.3. Callback Notification

There are no Callback Notifications.

4.16.8.2. Hardware - Software - ISR API name mapping

The MCU module doesn’t implement any Interrupt Service Routines.

4.16.8.3. Scheduling Strategy

4.16.8.3.1. SchM

Beside the OS the BSW Scheduler provides functions that module MCU calls at begin and end of critical sections.

4.16.8.3.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.16.9. API Description

4.16.9.1. Description of the API’s

Please refer MCAL_AM263_ApiGuide.CHM document provided as part of CSP.

4.16.9.2. API’s with Service ID

The following table presents the service IDs and the related services:

Autosar API’s Supported:

Service ID

Autosar API’s Supported Service

Autosar API’s not Supported Service

0x00

Mcu_Init

0x01

Mcu_InitRamSection

0x02

Mcu_InitClock

0x03

Mcu_DistributePllClock

0x04

Mcu_GetPllStatus

0x05

Mcu_GetResetReason

0x06

Mcu_GetResetRawValue

0x07

Mcu_PerformReset

0x09

Mcu_GetVersionInfo

0x0A

Mcu_GetRamState

0x08

Mcu_SetMode

Refer Autosar SWS for API description mentioned in above table.

4.16.9.3. Description on Non Standard API’s

Mcu_DeInit API

This function is Non- Autosar based and is used to de-initialize MCU module.

Mcu_RegisterReadback API

This function is non-autosar based and is used to read the data in the registers of MCU.

This functionality is enabled, if parameter McuEnableRegisterReadbackApi is TRUE (The Parameter sets MCU_REGISTER_READBACK_API Macro as STD_ON ).

4.16.10. Configuration Description

4.16.10.1. Configuration Variants

The MCU can be configured as Post-Build or Pre-Compile variant, using EB tresos tool.

Variants

Generated Files

PostBuild

Mcu_PBcfg.c , Mcu_Cfg.h

Pre-Compile

Mcu_Cfg.c , Mcu_Cfg.h

4.16.10.2. Parameter Description

4.16.10.2.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

Maximum value in ticks, the timer channel is able to count. With the next tick, the timer rolls over to zero

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.

Value will be changed w.r.t modules

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.

0

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

2281701376

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..6

Boolean

MCU_E_CLOCK_FAILURE

Reference to configured DEM event to report Clock source failure

Ref. from DEM module

NA

Symbolic name Reference

4.16.10.2.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

McuPBISTTestEnable

Non used/implemented parameter.Pre-processor switch to enable / disable the PBIST test

FALSE

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

0..4294967295

Integer

McuPMICFreqAccuModeSel

Non used/implemented parameter.PMIC_CLKOUT Frequency accumulation Mode selection, 0: Continuous mode, 1: Staircase mode . Bit 8 of DCDCCTL1.

0

0-1

Integer

McuPMICFreqSlopeVal

Non used/implemented parameter.26 bit PMIC_CLKOUT Frequency slope value. BIT [26:0] of DCDCCTL0

0

0..0x7FFFFFF

Integer

McuPMICFreqThresMin

Non used/implemented parameter.MIC_CLKOUT Minimum frequency threshold value. Bit [23:16] of DCDCCTL1

0

0..0xFF

Integer

McuPMICFreqThresMax

Non used/implemented parameter.PMIC_CLKOUT Maximum frequency threshold value. Bit [31:24] of DCDCCTL1

0

0..0xFF

Integer

McuPMICClkEn

Non used/implemented parameter.PMIC_CLKOUT Enable Multi-bit. BIT 1 of DCDCCTL1

0

0-1

Integer

McuPMICDiterCtrl

Non used/implemented parameter.PMIC_CLKOUT dithering control block reset . BIT 0 of DCDCCTL1

0

0-1

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

ModuleId for which clock setting to be applied

MCU_CLKSRC_MODULE_ID_QSPI

MCU_CLKSRC_MODULE_ID_MCANA MCU_CLKSRC_MODULE_ID_MCANB MCU_CLKSRC_MODULE_ID_RTIA MCU_CLKSRC_MODULE_ID_RTIB MCU_CLKSRC_MODULE_ID_RTIC MCU_CLKSRC_MODULE_ID_WDT MCU_CLKSRC_MODULE_ID_QSPI MCU_CLKSRC_MODULE_ID_SPIA MCU_CLKSRC_MODULE_ID_SPIB MCU_CLKSRC_MODULE_ID_I2C MCU_CLKSRC_MODULE_ID_SCIA MCU_CLKSRC_MODULE_ID_SCIB MCU_CLKSRC_MODULE_ID_CPSW MCU_CLKSRC_MODULE_ID_CPTS MCU_CLKSRC_MODULE_ID_HSI_CLK MCU_CLKSRC_MODULE_ID_CSIRX MCU_CLKSRC_MODULE_ID_MCU_CLKOUT MCU_CLKSRC_MODULE_ID_PMIC_CLKOUT MCU_CLKSRC_MODULE_ID_OBS_CLKOUT MCU_CLKSRC_MODULE_ID_TRC_CLKOUT MCU_CLKSRC_MODULE_ID_MII100_CLK MCU_CLKSRC_MODULE_ID_MII10_CLK MCU_CLKSRC_MODULE_ID_RGMI_CLK MCU_CLKSRC_MODULE_ID_GPADC_CLK MCU_CLKSRC_MODULE_ID_RCSSSPIA_CLK MCU_CLKSRC_MODULE_ID_RCSSSPIB_CLK

Enumeration

McuClockSourceId

Clock source Id for selected module

Will be calculated.Vary for modules

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

0

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 MCU Crossbar Details of AM263x)

Enumeration

McuInterruptChannelXbarMap

Interrupt Cross BarMap

MCU_INT_XBAR_EPWM0_INT

(Refer section MCU Crossbar Details of AM263x)

Enumeration

McuInputChannelXbar

Input Cross Bar

MCU_INPUT_XBAR0_OUT_0

(Refer section MCU Crossbar Details of AM263x)

Enumeration

McuInputChannelXbarMap

Input Cross BarMap

MCU_INPUT_XBAR_GPIO0

(Refer section MCU Crossbar Details of AM263x)

Enumeration

McuGpioIntrXbar

GPIO xbar Interrupt

MCU_GPIO_0

(Refer section MCU Crossbar Details of AM263x)

Enumeration

McuGpioXbarOutMap

Gpio xbar output pin mapping

MCU_GPIO_INT_XBAR_VIM_MODULE0_0

(Refer section MCU Crossbar Details of AM263x)

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

McuFRCClockSourceId

Non used/implemented parameter.Clock source Id for Free running counter FRC

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

McuWDTClockSourceId

Non used/implemented parameter.Clock source Id for Watch dog timer

MCU_CLKSRC_2

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

McuRTIClockSourceId

Non used/implemented parameter.Clock source Id for RTI

MCU_CLKSRC_2

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

McuDCANClockSourceId

Non used/implemented parameter.Clock source Id for DCAN

MCU_CLKSRC_4

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

McuQSPIClockSourceId

Non used/implemented parameter.Clock source Id for QSPI

MCU_CLKSRC_4

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

McuFDCANClockSourceId

Non used/implemented parameter.Clock source Id for FDCAN

MCU_CLKSRC_4

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

McuDeviceVariant

Select SOC variant. This parameter shall be used by driver to impose device specific constraints.

AM263x

AM263x

Enumeration

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.16.10.3. Symbolic Names deviations

None

4.16.10.4. Configuration rules and constraints to enable plausibility checks

Will be updated in future release

4.16.11. 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.16.12. Memory footprint

Please refer Memory Footprint for more details.

4.16.13. Performance

Not Applicable

4.16.14. Example Usage

4.16.14.1. 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=am263.

Once the build is completed we get a binary file, which is loaded in our controller and executed.

4.16.14.2. External set up Information

None

4.16.14.3. Configuration used to test this example

  1. MCU module will initialize the clock for configured modules.

  2. McuRamSectionBaseAddress is configured with ‘zero’ and reference array is also configured with default value of RAM section.

  3. After configuration, Mcu_InitRamSection API is invoked inorder to set ‘McuRamSectionBaseAddress’ with default value.

  4. Reference array and McuRamSectionBaseAddress is compared with each other to check whether RAM section is initialized properly or not.

  5. It will also check for reset reason.

  6. Mcu_GetResetReason API’s return value is compared with MCU_POWER_ON_RESET to check the wakeup cause.

4.16.14.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.16.15. FAQ’s

None

4.16.16. Test Report

Please refer AM26x MCU Driver Test Case Report as part of CSP provided in the release package.

4.16.17. References

4.16.18. TI Disclaimer

Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue any product or service without notice, and advise customers to obtain the latest version of relevant information to verify, before placing orders, that information being relied on is current and complete. All products are sold subject to the terms and conditions of sale supplied at the time of order acknowledgment, including those pertaining to warranty, patent infringement, and limitation of liability.

TI warrants performance of its products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are utilized to the extent TI deems necessary to support this warranty. Specific testing of all parameters of each device is not necessarily performed, except those mandated by government requirements.

Customers are responsible for their applications using TI components. In order to minimize risks associated with the customer’s applications, adequate design and operating safeguards must be provided by the customer to minimize inherent or procedural hazards.

TI assumes no liability for applications assistance or customer product design. TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right of TI covering or relating to any combination, machine, or process in which such products or services might be or are used. TI’s publication of information regarding any third party’s products or services does not constitute TI’s approval, license, warranty or endorsement thereof.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations and notices. Representation or reproduction o f this information with alteration voids all warranties provided for an associated TI product or service, is an unfair and deceptive business practice, and TI is not responsible nor liable for any such use.

Resale of TI’s products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service, is an unfair and deceptive business practice, and TI is not responsible nor liable for any such use.

Also see: Standard Terms and Conditions of Sale for Semiconductor Products https://www.ti.com/sc/docs/stdterms.htm

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265