4.4. CDD FLC Module
4.4.1. Acronyms and Definitions
Abbreviation/Term |
Explanation |
---|---|
AUTOSAR |
Automotive Open System Architecture |
RTE |
Runtime Environment |
BSW |
Basic Software |
MCAL |
Micro Controller Abstraction Layer |
API |
Application Programming Interface |
DET |
Default Error Tracer |
HW |
Hardware |
SW |
Software |
I/O |
Input/Output |
FLC |
Fast Local Copy |
OS |
Operating System |
4.4.2. Introduction
This document describes the functionality and configuration of the Cdd_Flc module.
Supported AUTOSAR Release |
4.3.1 |
---|---|
Supported Configuration Variants |
None |
Vendor ID |
CDD_FLC_VENDOR_ID (44) |
Module ID |
CDD_FLC_MODULE_ID (255) |
Supported Platform |
AM263Px, AM261x |
The FLC CDD provides services to configure the Fast Local Copy (FLC) of the SOC.
4.4.3. Functional Overview
Each R5F core integrates a Fast Local Copy (FLC) engine to accelerate boot up. Reducing boot time of R5F is essential to achieve 50ms CAN response.
4.4.3.1. Initialization
This module doesn’t support any initialization and de-init routines. Hence there is no requirement to support pre-compile and post build configuration options.
The driver provides only compile time configuration options via Cdd_Flc_Cfg.h. The user need to edit this file to have different configuration from the current default configurations. Generation of this configuration is not provided via configurator as this module doesn’t have or require init time configurations.
4.4.3.2. States
This driver is stateless.
4.4.3.3. Assumptions
None
4.4.3.4. Limitations
None
4.4.3.5. Design Overview
Please refer SITARA MCU MCAL Architecture Document and MCAL: CDD FLC Detailed Design Document provided as part of CSP.
4.4.4. Hardware Features
4.4.4.1. Hardware Features supported
Support up to four flash regions per FLC with 64kB granularity
Internal DMA engine to copy code from flash to SRAM sequentially for all regions
Redirect access to flash when the data is not yet available in SRAM
Redirect access to SRAM when the data is available in SRAM
Transparent to core after initial configuration of regions
Pass-through for addresses not in the programmed regions
The SRAM redirection does not wait till the entire region is mirrored, but is enabled as soon as the content at that address is valid in SRAM
Option to disable DMA copy and only enable SRAM redirection
4.4.5. Source Files
Static source C Files are defined below
📦AM263Px
┣ 📂build
┣ 📂mcal
┃ ┣ 📂Cdd_Flc
┃ ┃ ┣ 📂include
┃ ┃ ┃ ┣ 📜Cdd_Flc.h : Contains the API’s of the driver to be used by upper layers.
┃ ┃ ┣ 📂src
┃ ┃ ┃ ┣ 📜Cdd_Flc.c : Contains the implementation of the API’s for the driver.
┃ ┃ ┃ ┣ 📂am263px
┃ ┃ ┃ ┃ ┗ 📜Cdd_Flc_Soc.h : Contains SOC specific internal data
┃ ┃ ┗ 📜Makefile
┃ 📂mcal_config
┃ 📂mcal_docs
┃ 📜README.txt
Plugin files are defined below in the table.
Plugin Files |
Description |
---|---|
Cdd_Flc_Cfg.h |
Contains the Precompile switches, Macros. |
4.4.6. Module Requirements
Please refer Software Product Specification document provided as part of CSP.
4.4.6.1. Memory Mapping
Memory Mapping Sections |
CDD_FLC_CODE |
CDD_FLC_CONST |
---|---|---|
CDD_FLC_START_SEC_CONST_UNSPECIFIED |
X |
|
CDD_FLC_STOP_SEC_CONST_UNSPECIFIED |
X |
|
CDD_FLC_START_SEC_CODE |
X |
|
CDD_FLC_STOP_SEC_CODE |
X |
4.4.6.2. Scheduling
Not applicable
4.4.6.3. Error Handling
4.4.6.3.1. Development Error Reporting
Development errors are reported to the DET using the service Det_ReportError() when enabled. The driver interface contains the MACRO declaration of the error codes to be returned.
4.4.6.3.1.1. Error Codes
Type of Error |
Related Error code |
Value (Hex) |
---|---|---|
API service called will null param pointer |
CDD_FLC_E_PARAM_POINTER |
0x01 |
API service called with illegal HW ID |
CDD_FLC_E_ILLEGAL_HW_ID |
0x02 |
API service called invalid configuration |
CDD_FLC_E_INVALID_CONFIG |
0x03 |
4.4.6.3.1.2. Runtime Error
None
4.4.6.3.2. DEM Error
None
4.4.7. Used Resources
4.4.7.1. Interrupt Handling
None
4.4.8. Integration Description
4.4.8.1. Dependent Modules
4.4.8.1.1. DET
The FLC module depends on the DET (by default) to report development errors. The DET can be replaced optionally by an equivalent component which is responsible to recognize development errors, if no DET component is available.
4.4.8.2. Multi-core Support
Not Supported
4.4.9. Configuration
The FLC Driver implementation supports multiple configuration variants The driver expects Cdd_Flc_Cfg.h to be present as input file.
4.4.10. Examples
4.4.10.1. Overview
The FLC example configures all the region to map source and destination memory, enables the FLC copy and compare the result.
4.4.10.1.1. External Connections
None
4.4.10.2. Hardware Software Setup and Tools
See example description above
4.4.10.3. Steps to Build and Run Example
FLC example application demonstrating the FLC features is in folder <MCAL_ROOT>/examples/Cdd_Flc.
This application can be built from the build folder by giving “gmake –s cdd_flc_app PLATFORM=am263px”
Once the build is completed we get a binary file, which is loaded in our controller and executed.
4.4.10.4. Example Logs
CDD_FLC_APP: Sample Application - STARTS !!!
FLC MCAL Version Info
---------------------
Vendor ID : 44
Module ID : 255
SW Major Version : 1
SW Minor Version : 0
SW Patch Version : 0
CDD_FLC_APP: FLC copy for region ID: 0, Loop: 0!!!
CDD_FLC_APP: FLC copy for region ID: 0, Loop: 1!!!
CDD_FLC_APP: FLC copy for region ID: 0, Loop: 2!!!
CDD_FLC_APP: FLC copy for region ID: 0, Loop: 3!!!
CDD_FLC_APP: FLC copy for region ID: 0, Loop: 4!!!
CDD_FLC_APP: FLC copy for region ID: 1, Loop: 0!!!
CDD_FLC_APP: FLC copy for region ID: 1, Loop: 1!!!
CDD_FLC_APP: FLC copy for region ID: 1, Loop: 2!!!
CDD_FLC_APP: FLC copy for region ID: 1, Loop: 3!!!
CDD_FLC_APP: FLC copy for region ID: 1, Loop: 4!!!
CDD_FLC_APP: FLC copy for region ID: 2, Loop: 0!!!
CDD_FLC_APP: FLC copy for region ID: 2, Loop: 1!!!
CDD_FLC_APP: FLC copy for region ID: 2, Loop: 2!!!
CDD_FLC_APP: FLC copy for region ID: 2, Loop: 3!!!
CDD_FLC_APP: FLC copy for region ID: 2, Loop: 4!!!
CDD_FLC_APP: FLC copy for region ID: 3, Loop: 0!!!
CDD_FLC_APP: FLC copy for region ID: 3, Loop: 1!!!
CDD_FLC_APP: FLC copy for region ID: 3, Loop: 2!!!
CDD_FLC_APP: FLC copy for region ID: 3, Loop: 3!!!
CDD_FLC_APP: FLC copy for region ID: 3, Loop: 4!!!
CDD_FLC_APP: Stack Usage: 824 bytes
CDD_FLC_APP: Sample Application - DONE (Passed) !!!
CDD_FLC_APP: All tests have passed
4.4.10.5. File Structure
📦AM263Px
┣ 📂build
┣ 📂mcal
┃ ┣ 📂examples
┃ ┃ ┣ 📂Cdd_Flc
┃ ┃ ┃ ┣ 📂soc
┃ ┃ ┃ ┣ 📜CddFlcApp.c : Contains test example.
┃ ┃ ┃ ┣ 📜CddFlcApp.h : Contains test private header containing dependent includes and macro.
┃ ┃ ┃ ┣ 📜Makefile
┃ ┣ 📂examples_config
┃ ┃ ┣ 📂Cdd_Flc_Demo_Cfg
┃ ┃ ┃ ┣ 📂soc
┃ ┃ ┃ ┃ ┣ 📂am263px
┃ ┃ ┃ ┃ ┃ ┣ 📂r5f0_0
┃ ┃ ┃ ┃ ┃ ┃ ┣ 📂include
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ 📜Cdd_Flc_Cfg.h : Contains the Precompile switches, Macros for FLC.
┃ 📂mcal_config
┃ 📂mcal_docs
┣ 📜README.txt
4.4.11. FAQ’s
None