4.1. ADC

4.1.1. About This Document

Document Title

User Guide of MCAL ADC Driver

Document Version

Version 1.1

Company

Texas Instruments

Document Name

ADC User Guide

4.1.2. Document Revision History

Version

Date

Revision History

Status

Version 1.0

31 Oct 2023

Initial Version

Approved

Version 1.1

15 Mar 2024

ADC Example application description updated for Polling and Interrupt access modes.

Approved

4.1.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 (Link to test report)

  13. References

  14. TI Disclaimer

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

MCU

Micro Controller Unit

OS

Operating System

API

Application Programming Interface

HW

Hardware

SW

Software

ISR

Interrupt Service Routine

SPS

Samples Per Second

SOC

Start of Conversion

EOC

End of Conversion

INT

Interrupt

4.1.5. Functional Overview

4.1.5.1. Brief Overview

This document describes MCAL ADC 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

ADC_VENDOR_ID (44)

Module ID

ADC_MODULE_ID (123)

Supported Platform

AM263px

The ADC module initiates analog to digital conversion requests and provides the conversion results for external analog monitoring channels and internally connected digital temperature sensors. It provides services to start, stop and read conversion results for configurable ADC groups consisting of one or more external analog monitoring channels.

4.1.5.1.1. ADC Driver Architecture

The following figure shows where the ADC is located in the AUTOSAR architecture

../_images/adc_image2.png

Figure 1: ADC in AUTOSAR architecture.

The ADC hardware module is a successive approximation (SAR) style ADC. This ADC is composed of a core and a wrapper. The core is composed of the analog circuits which include the channel select MUX, the sample-and hold (S/H) circuit, the successive approximation circuits, voltage reference circuits, and other analog support circuits. The wrapper is composed of the digital circuits that configure and control the ADC. These circuits include the logic for programmable conversions, result registers, interfaces to analog circuits, interfaces to the peripheral buses, post-processing circuits, and interfaces to other on-chip modules. Each ADC module consists of a single sample-and-hold (S/H) circuit. The ADC module is designed to be duplicated multiple times on the same chip, allowing simultaneous sampling or independent operation of multiple ADCs.

../_images/adc_image3.png

Figure_2: ADC Hardware Overview.

../_images/adc_image13.png

Figure_3: System Overview.

4.1.5.1.2. Initialization

Adc_Init() has to be called to initialize the ADC driver before initiating any group conversion. This will also set all the groups to ADC_IDLE state.

4.1.5.1.3. States

There are 4 states in which each ADC group for one shot single access mode can be:

  1. ADC_IDLE: This is the state before starting a group, no conversion request for the group has been initiated or after the conversion result of a stream completed group is read.

  2. ADC_BUSY: This is the state after a group is started but hasn’t finished i.e. conversion result for the group is not yet available.

  3. ADC_COMPLETED: This is the state after a group has finished first or more samples of ADC analog input.

  4. ADC_STREAM_COMPLETED: This is the state after a group has finished i.e., conversion result for the group is available.

../_images/adc_image4.jpeg

Figure 3: ADC State Diagram - 1

../_images/adc_image19.png

Figure 4: ADC State Diagram - 2

4.1.5.2. Features Supported and Not Supported

ADC IP Features supported

Autosar Features Supported

Not Supported

12-bit resolution

Single-ended signal conversions

Multiple trigger sources

Input multiplexer with up to 6 channels

16 individually addressable result registers

Four flexible interrupts

Post-Processing Blocks:

Flag a high or low compare limit

Software triggered one-shot conversion where the converted group consists of exactly one channel.

Hardware triggered one-shot conversion where the converted group consists of exactly one channel.

Continuous conversion where the converted group consists of exactly one channel.

Software triggered one-shot conversion where the converted group consists of more than one channel.

Hardware triggered one-shot conversion where the converted group consists of more than one channel.

Continuous conversion where the converted group consists of more than one channel.

Support for limit checking for all ADC hardware channels.

ADC Hardware Features not supported

Burst mode

External reference set by VREFHI and VREFLO pins

Differential mode support

Four post-processing blocks each with

Saturating offset calibration

Error from set-point calculation

Trigger-to-sample delay capture

Autosar Features not supported

Support and management of HW low power states

4.1.5.3. Assumptions

None

4.1.5.4. Limitations

Maximum 4 hardware triggered channel groups can be queued, when ADC Priority implementation ADC_PRIORITY_HW and ADC_PRIORITY_HW_SW.

Note

Hardware Triggered Channel Groups can be queued with ADC Priority implementation ADC_PRIORITY_HW and ADC_PRIORITY_HW_SW.

ADC Priority implementation ADC_PRIORITY_HW and ADC_PRIORITY_HW_SW requires all four Interrupts (ADC_INT1 to ADC_INT4) for conversion of ADC (In case of using queuing mechanism).

4.1.5.6. File Structure

Description of static files is provided below:

Static source and header files

Description

Adc.h

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

Adc.c

Contains the implementation of the API’s for ADC driver.

Adc_Irq.c and Adc_Irq.h

Contains ISR function definitions

Adc_Types.h

Contains the autosar data types and internal macro definitions.

Adc_Priv.c and Adc_Priv.h

Contains Internal functions definition of ADC driver.

Adc_Platform.c and Adc_Platform.h

Contains device specific a function definition, data types and definitions.

Description of generated files is provided below:

Plugin Files

Descriptions

Adc_Cfg.h

Contains the Precompile switches, Symbolic names of Group, channels and hardware units and Configured maximum number Groups and hardware units

Adc_PBcfg.c

Contains all channels Post-Build Configured parameters

Adc_Cfg.c

Contains all channels Pre-Compile Configured parameters

../_images/adc_image5.png

Figure 4: ADC header file include structure

4.1.6. Deviations to requirements (Requirement Traceability)

4.1.6.1. Module Requirements

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

4.1.6.2. Deviation of requirements against AUTOSAR specification requirements

Will be updated in future release

4.1.7. Integration Details

4.1.7.1. Dependency on Other Software Modules

4.1.7.1.1. The ADC Driver dependent modules

4.1.7.1.1.1. MCU

The ADC modules expects the MCU module to be powered on. 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/adc_image6.jpeg

Figure 7: ADC Hardware container

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

../_images/adc_image7.jpeg

Figure 8: McuAdcConfiguration container

../_images/adc_image8.jpeg

Figure 9: ADC Hardware unit selection.

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.

../_images/adc_image9.jpeg

Fig. 4.1 Figure 10: ADC Interrupt configuration.

../_images/adc_image10.jpeg

Figure 11: ADC Interrupt selection.

4.1.7.1.1.2. DMA

The ADC Module requires DMA module to be configured, when ADC is configured in DMA mode and ADC channel Group is configured for DMA access.

  1. ADC Module Configuration:

    • The ADC module parameter AdcDMAEnable should be configured for TRUE.

    • The ADC Channel Group parameter AdcGroupDataAccessMethod should be configured with ADC_GROUP_DMA_ACCESS.

    • The ADC parameter AdcDmaReference in AdcGroup container shall refer to CDD DMA module container CddDmaDriverHandler .

  2. DMA module Configuration:

    • In CDD DMA module, CddDmaChannelTriggerConfiguration container should be configured w.r.t the trigger selection for ADC module.

    • ADC module is dependent on X-BAR DMA interrupts, thus we have configure the X-BAR interrupts in DMA module.

  3. The ADC Trigger source should be configured for one and many of DMA channels using following parameters, in containers

    • CddDmaChannelTriggerSource represents which Trigger source we should map the DMA Channel ID.

    • CddDmaDmaChannelXbar represents the DMA Cross-BAR. If the CddDmaChannelTriggerSource is selected between DMA_TRIG_XBAR_DMA_XBAR_OUT_0 to DMA_TRIG_XBAR_DMA_XBAR_OUT_15, then this parameter should be mapped to respective Cross-BAR.

    • CddDmaDmaChannelXbarMap represents the trigger source for the Cross-BAR, which can be from module like ADC, EPWM, FSI etc.

    • The ADC Trigger source should be selected according to the Interrupt Source and ADC instance configured. The ADC parameter AdcDmaReference in AdcGroup container shall refer to CDD DMA module container CddDmaDriverHandler.

../_images/adc_image11.jpeg

Figure 12: CDD DMA configuration.

../_images/adc_image12.jpeg

Figure 13: ADC module DMA channel ID selection.

4.1.7.1.2. Error Handling module

4.1.7.1.2.1. DET

The module ADC 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 parameter AdcDevErrorDetect (The macro ADC_DEV_ERROR_DETECT = STD_ON generated in file Adc_Cfg.h).

The DET can be replaced optionally by an equivalent component which is responsible to recognize development errors, if no DET component is available.

The DET error is reported with Module ID.

The reported service IDs identify the services which are described earlier.

The following table represents the service IDs:

Service ID

Service

ADC_SID_INIT = 0x00

Adc_Init

ADC_SID_DEINIT = 0x01

Adc_DeInit

ADC_SID_START_GROUP_CONVERSION = 0x02

Adc_StartGroupConversion

ADC_SID_STOP_GROUP_CONVERSION = 0x03

Adc_StopGroupConversion

ADC_SID_READ_GROUP = 0x04

Adc_EnableHardwareTrigger

ADC_SID_ENABLE_HARDWARE_TRIGGER = 0x05

Adc_EnableGroupNotification

ADC_SID_DISABLE_HARDWARE_TRIGGER = 0x06

Adc_DisableHardwareTrigger

ADC_SID_ENABLE_GROUP_NOTIFICATION = 0x07

Adc_EnableGroupNotification

ADC_SID_DISABLE_GROUP_NOTIFICATION = 0x08

Adc_DisableGroupNotification

ADC_SID_GET_GROUP_STATUS = 0x09

Adc_GetGroupStatus

ADC_SID_GET_VERSION_INFO = 0x0A

Adc_GetVersionInfo

ADC_SID_GET_STREAM_LAST_POINTER = 0x0B

Adc_GetStreamLastPointer

ADC_SID_SETUP_RESULT_BUFFER = 0x0C

Adc_SetupResultBuffer

ADC_SID_SET_POWER_STATE = 0x10

Adc_SetPowerState

ADC_SID_GET_CURRENT_POWER_STATE = 0x11

Adc_GetCurrentPowerState

ADC_SID_GET_TARGET_POWER_STATE = 0x12

Adc_GetTargetPowerState

ADC_SID_PREPARE_POWER_STATE = 0x13

Adc_PreparePowerState

ADC_SID_MAIN_POWER_TRANSITION_MANAGER = 0x14

Adc_Main_PowerTransitionManager

ADC_SID_POLLING_MAINFUNCTION = 0x15

Adc_PollingMainFunction

ADC_SID_IOHWAB_NOTIFICATION = 0x20

IoHwAb_AdcNotification

ADC_SID_IOHWAB_NOTIFY_READY_FOR_POWER_STATE = 0x70

IoHwAb_Adc_NotifyReadyForPowerState

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

Error Code

Error Macro

Description

[0x0A]

ADC_E_UNINIT

API service used without module initialization

[0x0B]

ADC_E_BUSY

API service called during ongoing process

[0x0C]

ADC_E_IDLE

API service called while no conversion is ongoing

[0x0D]

ADC_E_ALREADY_INITIALIZED

API service called ADC is already initialized.

[0x0E]

ADC_E_PARAM_CONFIG

API service called with incorrect configuration parameter

[0x14]

ADC_E_PARAM_POINTER

API service called with invalid data buffer

[0x15]

ADC_E_PARAM_GROUP

API service called with invalid group ID

[0x16]

ADC_E_WRONG_CONV_MODE

API service called on a group with conversion mode configured as continuous

[0x17]

ADC_E_WRONG_TRIGG_SRC

API service called for group with wrong trigger source

[0x18]

ADC_E_NOTIF_CAPABILITY

Enable/disable notification function for a group whose configuration set has no notification available

[0x19]

ADC_E_BUFFER_UNINIT

Conversion started and result buffer pointer is not initialized

[0x16]

ADC_E_WRONG_CONV_MODE

API servcie called on a group with conversion mode configured as continuous and HW Trigger

[0x17]

ADC_E_WRONG_TRIGG_SRC

API service called for group with wrong trigger source

[0x18]

ADC_E_NOTIF_CAPABILITY

Enable/disable notification function for a group whose configuration set has no notification available

[0x19]

ADC_E_BUFFER_UNINIT

Conversion started and result buffer pointer is not initialized

[0x1A]

ADC_E_NOT_DISENGAGED

One or more ADC group/channel not in IDLE state

[0x1B]

ADC_E_POWER_STATE_NOT_SUPPORTED

Unsupported power state request

[0x1C]

ADC_E_TRANSITION_NOT_POSSIBLE

Requested power state cannot be reached directly

[0x1D]

ADC_E_PERIPHERAL_NOT_PREPARED

ADC not prepared for target power state

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

Error Code

Error Macro

Description

[0x0B]

ADC_E_BUSY

API service called during ongoing process

[0x0C]

ADC_E_IDLE

API service called while no conversion is ongoing

AUTOSAR requires that API functions check the validity of their parameters. The checks are described in spec and are done as internal parameter checks of the API functions. These checks are for development error reporting and can be en/dis-abled separately. Refer to the configuration chapter where the en/dis-abling of the checks is described. En/dis-abling of single checks is an addition to the AUTOSAR standard which requires to en/dis-able the complete parameter checking via the parameter ADC_DEV_ERROR_DETECT. The following table shows which parameter checks are performed on which services:

Check Services

ADC_E_UNINIT

ADC_E_BUSY

ADC_E_IDLE

ADC_E_ALREADY_INITIALIZED

ADC_E_PARAM_CONFIG

ADC_E_PARAM_POINTER

ADC_E_PARAM_GROUP

ADC_E_WRONG_TRIGG_SRC

ADC_E_NOTIF_CAPABILITY

ADC_E_BUFFER_UNINIT

Adc_Init

x

x

Adc_DeInit

x

Adc_StartGroupConversion

x

x

x

x

Adc_StopGroupConversion

x

x

x

x

Adc_ReadGroup

x

x

x

x

Adc_EnableGroupNotification

x

x

x

x

Adc_DisableGroupNotification

x

x

x

Adc_GetGroupStatus

x

x

Adc_GetVersionInfo

x

Adc_SetupResultBuffer

x

x

x

x

Adc_EnableHardwareTrigger

x

x

x

x

Adc_DisEnableHardwareTrigger

x

x

x

x

Adc_Get_StreamLastPointer

4.1.7.1.2.2. DEM

ADC modules does not report DEM errors.

4.1.7.1.2.3. Callback Functions

The ADC driver does not provide any call back functions.

4.1.7.1.2.4. Callback Notification

Notifications:

As it is a configurable interface, the ADC defines notifications that can be mapped to callback functions provided by other modules. The mapping is not statically defined by the ADC but can be performed at configuration time. The function prototypes that can be used for the configuration have to match the appropriate function prototype signatures, which are described in the following.

Adc_GroupEndNotifyType:

This is of type Adc_GroupEndNotifyType which is defined in Adc_Types.h file. This is called to notify the group about the completion of the requested conversion and availability of the conversion results.

4.1.7.2. Hardware - Software - ISR API name mapping

For interrupt notification, ISR’s are provided in ADC driver. There are four ISR for each ADC hardware unit. Depending on hardware unit configured, it will call group notify function. The interrupt service routines shall be mapped to the interrupt sources of the respective cross bar interrupt. The supported ISR’s are part of the Adc_Irq.h file.

Following are ADC module ISR for each hardware unit:

For interrupt notification, ISR’s are provided in ADC driver. There is one ISR for each ADC hardware unit. Depending on hardware unit configured, it will call group notify function. The interrupt service routines shall be mapped to the interrupt sources of the respective cross bar interrupt. The supported ISR’s are part of the Adc_Irq.h file.

Following are ADC module ISR for each hardware unit:

ADC HW UNIT

HW Interrupt

SW ISR for ADC module

ADC HW UNIT 0

ADC0.INT1

Adc_ADCINT1_IrqUnit0

ADC0.INT2

Adc_ADCINT2_IrqUnit0

ADC0.INT3

Adc_ADCINT3_IrqUnit0

ADC0.INT4

Adc_ADCINT4_IrqUnit0

ADC HW UNIT 1

ADC1.INT1

Adc_ADCINT1_IrqUnit1

ADC1.INT2

Adc_ADCINT2_IrqUnit1

ADC1.INT3

Adc_ADCINT3_IrqUnit1

ADC1.INT4

Adc_ADCINT4_IrqUnit1

ADC HW UNIT 2

ADC2.INT1

Adc_ADCINT1_IrqUnit2

ADC2.INT2

Adc_ADCINT2_IrqUnit2

ADC2.INT3

Adc_ADCINT3_IrqUnit2

ADC2.INT4

Adc_ADCINT4_IrqUnit2

ADC HW UNIT 3

ADC3.INT1

Adc_ADCINT1_IrqUnit3

ADC3.INT2

Adc_ADCINT2_IrqUnit3

ADC3.INT3

Adc_ADCINT3_IrqUnit3

ADC3.INT4

Adc_ADCINT4_IrqUnit3

ADC HW UNIT 4

ADC4.INT1

Adc_ADCINT1_IrqUnit4

ADC4.INT2

Adc_ADCINT2_IrqUnit4

ADC4.INT3

Adc_ADCINT3_IrqUnit4

ADC4.INT4

Adc_ADCINT4_IrqUnit4

DMA Module ISR

EDMA INT

CDD_EDMA_lld_transferCompletionMasterIsrFxn

4.1.7.3. Scheduling Strategy

4.1.7.3.1. SchM

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

4.1.7.3.2. Critical Sections

There is only one kind of critical sections in this driver. Within these sections all read /modify / write accesses to internal ADC driver data structures must be protected. Therefore switching to tasks that also access ADC has to be avoided and all ADC interrupts have to be suspended. This is handled internally by ADC Driver.

4.1.8. API Description

4.1.8.1. Description of the API’s (Can be referred to Api Guide spec)

Refer the AUTOSAR SWS for API documentation and Type definition.

4.1.8.2. API’s with Service ID

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

Service ID

Autosar API’s Supported

Autosar API’s not Supported

0x00

Adc_Init

0x01

Adc_DeInit

0x02

Adc_StartGroupConversion

0x03

Adc_StopGroupConversion

0x04

Adc_ReadGroup

0x05

Adc_EnableHardwareTrigger

0x06

Adc_DisableHardwareTrigger

0x07

Adc_EnableGroupNotification

0x08

Adc_DisableGroupNotification

0x09

Adc_GetGroupStatus

0x0A

Adc_GetVersionInfo

0x0B

Adc_GetStreamLastPointer

0x0C

Adc_SetupResultBuffer

0x20

IoHwAb_AdcNotification

0x10

Adc_SetPowerState

0x11

Adc_GetCurrentPowerState

0x12

Adc_GetTargetPowerState

0x13

Adc_PreparePowerState

0x14

Adc_Main_PowerTransitionManager

0x15

Adc_PollingMainFunction

0x70

IoHwAb_Adc_NotifyReadyForPowerState

Refer Autosar SWS for API description mentioned in above table.

4.1.8.3. Description on Non Standard API’s

Adc_RegisterReadback API

This function is Non- Autosar based and is used to read the data in the registers of ADC.

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

Adc_InitTemperatureRead

This API not applicable for AM263.

Adc_ReadTemperature

This API not applicable for AM263.

Adc_ReadTemperatureResult

This API not applicable for AM263.

4.1.9. Configuration Description

4.1.9.1. Configuration Variants

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

Variants

Generated Files

PostBuild

Adc_PBcfg.c , Adc_Cfg.h

Pre-Compile

Adc_Cfg.c , Adc_Cfg.h

4.1.9.2. Parameter Description

Will be added in the future release

4.1.9.3. Symbolic Names deviations

None.

4.1.9.4. Configuration rules and constraints to enable plausibility checks

None.

4.1.10. Memory Mapping

Memory Mapping Sections

ADC_CODE

ADC_CODE_ISR

ADC_VAR_NO_INIT

ADC_VAR

ADC_CONST

ADC_PBCFG

ADC_START_SEC_VAR_INIT_UNSPECIFIED(.bss)

x

ADC_STOP_SEC_VAR_INIT_UNSPECIFIED

x

ADC_START_SEC_CONFIG_DATA (.const)

x

ADC_STOP_SEC_CONFIG_DATA

x

ADC_START_SEC_CODE(.text)

x

ADC_STOP_SEC_CODE

x

ADC_START_SEC_VAR_INIT_32(.bss)

x

ADC_STOP_SEC_VAR_INIT_32

x

ADC_START_SEC_VAR_NO_INIT_UNSPECIFIED(.data)

x

ADC_STOP_SEC_VAR_NO_INIT_UNSPECIFIED

x

ADC_START_SEC_ISR_CODE

x

ADC_STOP_SEC_ISR_CODE

x

4.1.11. Memory footprint

Please refer Memory Footprint for more details.

4.1.12. Performance

CovMode

TriggSrc

Num_Of_Channels

Theoritical(SPS)

Practical(SPS)

One_Shot

SRC_HW

1

493827

433839

One_Shot

SRC_SW

1

493827

429645

One_Shot

SRC_HW

6

2962962

1073345

One_Shot

SRC_SW

6

2962962

1089918

Continuous

SRC_SW

6

2962962

2461538

4.1.13. Example Usage

4.1.13.1. Steps to build and run example

ADC example application demonstrating the MCAL ADC driver features is in folder <MCAL_ROOT>/examples/Adc.

This application can be built from the root folder by giving gmake –s adc_app PLATFORM=am263px.

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

4.1.13.2. External set up Information

ADC module is tested using CC board (PROC111E2) and analog input is provided to ADC input channels through DC power supply (0-12V).

The ADC analog input for the AM263px ranges from 0 – 3.3V.

ADC_ANI0 is provided with 1V.

ADC_ANI1 is provided with 3.2V.

PMIC Settings should be initialized for AM263Px CC board.

4.1.13.3. Configuration used to test this example

The ADC module example is configured with following groups on ADC Hardware Unit 1

  1. Adc Group 0 : One Shot Conversion Software Triggered with Data Access Polling Mode.

  2. Adc Group 1 : One Shot Conversion Software Triggered with Data Access Interrupt Mode.

  3. Adc Group 2 : One Shot Conversion Software Triggered with Data Access Polling Mode.

  4. Adc Group 3 : One Shot Conversion Software Triggered with Data Access Interrupt Mode.

The ADC module example application testing procedure as follows:

HW UNIT 1 is configured

One Shot Mode Testing: (Group 0) (Group 1) (Group 2) (Group 3) (HW UNIT 1)

  1. Group is Triggered for Conversion using API Adc_StartConversion()

  2. Adc_PollingMainFunction() is called for Groups configured as Data Access Polling Mode.

  3. AdcApp_procIsr() is called through AdcApp_GroupEndNotification for Groups configured as Data Access Interrupt Mode.

  4. Wait until the conversion is completed.

  5. Conversion is stopped using API Adc_StopConversion().

  6. Check the notification message, the notification counter should be incremented with ADC results available in the ADC result buffer ( Adc_AppBuffer )

Cross bar mapping:

  1. ADC HW UNIT 1 : ADC1.INT1 is mapped to XBAR1 (147)

  2. ADC HW UNIT 3 : ADC3.INT1 is mapped to XBAR2 (148)

Refer crossbar section in MCU module to map crossbar.

4.1.13.4. Example Logs

ADC_APP: Sample Application - STARTS !!!
ADC_APP: GROUPs 4: HWUNIT 1: LOOP COUNT 1:!!!

--------------------------------------
Apply different voltages (between 0 - 3.3 volts) to the Six ADC channels
--------------------------------------

Press any key to start conversion


 ADC MCAL Version Info
 ---------------------
 Vendor ID           : 44
 Module ID           : 123
 SW Major Version    : 9
 SW Minor Version    : 1
 SW Patch Version    : 0


 Read Buffer Content
 -------------------
 ADC Group 0 Log:
 ----------------
 Channel                ADC Value       Volt
 ----------------------------------------------------
 0              0x00000cc1      1434mV
 ADC Group 1 Log:
 ----------------
 Channel                ADC Value       Volt
 ----------------------------------------------------
 0              0x00000cc1      1434mV
 ADC Group 2 Log:
 ----------------
 Channel                ADC Value       Volt
 ----------------------------------------------------
 0              0x00000cc1      1434mV
 1              0x00000000      0000mV
 2              0x00000000      0000mV
 3              0x00000000      0000mV
 ADC Group 3 Log:
 ----------------
 Channel                ADC Value       Volt
 ----------------------------------------------------
 0              0x00000cc1      1434mV
 1              0x00000000      0000mV
 ADC Test Passed!!!
 ADC_APP: Sample Application - DONE !!!

4.1.14. FAQ’s

None

4.1.16. References

Technical Reference Manual

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