5. API Description

5.1. Table of Content

5.2. ADC
5.3. CAN
5.4 CDD DMA
5.5 CDD FSIRX
5.6 CDD FSITX
5.7. CDD I2C
5.8. CDD IPC
5.9 CDD PWM
5.10 CDD UART
5.11 DIO
5.12 ETH
5.13 ETHTRCV
5.14 FLS
5.15 GPT
5.16 ICU
5.17 LIN
5.18 MCU
5.19 PORT
5.20 PWM
5.21 SPI
5.22 WDG

5.2. ADC

5.2.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

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

5.2.3. Description on Non Standard API’s

Adc_PollingMainFunction

This function will used when Group is in Polling mode.

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

Service Id is 0x16.

Adc_InitTemperatureRead

This API not applicable for AM263.

Adc_ReadTemperature

This API not applicable for AM263.

Adc_ReadTemperatureResult

This API not applicable for AM263.

5.3. CAN

5.3.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

5.3.2. API’s with Service ID

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

Service ID

Service

0x00

Can_Init

0x01

Can_MainFunction_Write

0x03

Can_SetControllerMode

0x04

Can_DisableControllerInterrupts

0x05

Can_EnableControllerInterrupts

0x06

Can_Write

0x07

Can_GetVersionInfo

0x08

Can_MainFunction_Read

0x09

Can_MainFunction_BusOff

0x0A

Can_MainFunction_Wakeup

0x0B

Can_CheckWakeup

0x0C

Can_MainFunction_Mode

0x0F

Can_SetBaudrate

0x10

Can_DeInit

0x11

Can_GetControllerErrorState

0x12

Can_GetControllerMode

0x14

Can_TestLoopBackModeEnable

0x15

Can_TestLoopBackModeDisable

5.3.3. Description on Non Standard API’s

Can_TestLoopBackModeEnable API–This function is non-autosar based and is used to enable the CAN loopback.

Can_TestLoopBackModeDisable API–This function is non-autosar based and is used to disable the CAN loopback.

5.4. CDD DMA

5.4.1. Description of the API’s

API SERVICE

DESCRIPTION

Cdd_Dma_Init

Service is used for initialization of the module.

Cdd_Dma_DeInit

Service to de-initialize the module. With this call all handlers registered are de-initialized.

Cdd_Dma_GetInitStatus

Service to provide the initialization status of the module.

Cdd_Dma_CbkRegister

Service to register callback function for a TCC. And this callback will be called once transfer completion happens for that particular TCC associated with the handle.

Cdd_Dma_ParamSet

Service to set the paramSet value with the param value associated with the channel of a particular handle.Here length of the transmission and how the data should be transferred is configured.

Cdd_Dma_LinkChannel

Service to link the params. Ofter used to link different params within the channel.With this functionality once the paramSet got empty after the transfer linked paramSet will be automatically loaded.

Cdd_Dma_ChainChannel

Service to chain multiple channels and used in transmission with one trigger.So when we chain multiple channels then with a single trigger it will transfer from both channels.

Cdd_Dma_EnableTransferRegion

Service to enable the trigger for transmission. Can be event based or manual.

Cdd_Dma_GetStatus

Service to Read the status of the transfer. Used in case of polling.In case of polling mode we need to continue poll this service in order to know the status of the transfer.

Cdd_Dma_GetVersionInfo

Service to get version information

Cdd_Dma_GetParam

Service to get the paramSet value with the param value associated with the channel of a particular handle.Here remaining data to be transferred is returned.

Cdd_Dma_DisableTransferRegion

Service to disable the trigger for transmission. Can be event based or manual.

5.4.2. API’s with Service ID

Service ID

Service

0x01

Cdd_Dma_Init

0x02

Cdd_Dma_DeInit

0x0A

Cdd_Dma_GetInitStatus

0x03

Cdd_Dma_CbkRegister

0x04

Cdd_Dma_ParamSet

0x05

Cdd_Dma_LinkChannel

0x06

Cdd_Dma_ChainChannel

0x07

Cdd_Dma_EnableTransferRegion

0x08

Cdd_Dma_GetStatus

0x09

Cdd_Dma_GetVersionInfo

0x0B

Cdd_Dma_GetParam

0x0C

Cdd_Dma_DisableTransferRegion

5.4.3. Description on Non Standard API’s

None

5.5. CDD FSIRX

5.5.1. Description of the CDD FSI RX API’s

All below mentioned API’s are user accessible and can be found in Cdd_FsiRx.c file

5.5.1.1. FUNC(void, CDD_FSIRX_CODE) Cdd_FsiRx_Init(P2CONST(Cdd_FsiRx_ConfigType, AUTOMATIC, CDD_FsiRx_CFG) ConfigurationPtr)

  1. Argument passed to the function is ConfigurationPtr.

  2. Function returns void

  3. Function initializes configuration Parameters to default values.

5.5.1.2. FUNC(void, CDD_FSIRX_CODE) Cdd_FsiRx_DeInit(void)

  1. Function used to de-initialize all initialized Fsi Rx Hardware Units

  2. Function returns void

  3. Function can not be called in case driver is uninitialized

5.5.1.3. Cdd_FsiRx_GetVersionInfo(P2VAR(Std_VersionInfoType, AUTOMATIC, CDD_FsiRx_APPL_DATA) VersionInfoPtr)

  1. Argument passed to the function is a valid pointer of type Std_VersionInfoType

  2. Function stores Version information in pointer

  3. Function returns void

5.5.1.4. FUNC(void, CDD_FSIRX_CODE) Cdd_FsiRx_setUpBuffer(Cdd_FsiRx_HWUnitType hwUnitId, P2VAR( CddFsiRxDataBufferType, AUTOMATIC, CDD_FSI_RX_APPL_DATA) DataBufferPtr,CddFsiRx_DataLengthType RxDataLength)

  1. Argument passed to the function are:

    • hwUnitId:Tx instance which Transmits.

    • DataBufferPtr: Pointer to the Data Buffer to which data has to be copied RxDataLength:Number of words in each Frame.

  2. Function copies data from the source pointer to internal Transmit buffer of Fsi Tx instance.

  3. Function returns E_OK/E_NOT_OK.

5.5.1.5. FUNC(void, CDD_FSIRX_CODE) Cdd_FsiRx_MainFunction(void)

  1. The API is used in Polling Mode only.

  2. The main function API Polls whether the reception status flags are set for each instance to ensure the data reception.

  3. Function returns void.

5.5.1.6. FUNC(void, CDD_FSIRX_CODE) Cdd_FsiRx_Reset(Cdd_FsiRx_HWUnitType hwUnitId, VAR(Cdd_FsiRx_ResetSubModuleType, AUTOMATIC) ResetModule)

  1. Argument passed to the function are:

    • hwUnitId:Tx instance which Transmits.

    • ResetModule: This argument specifies where the reset happens. Example:, Main Core Reset, Ping Watchdog Reset,Frame Watchdog Reset

  2. Function initiates the reset of the particular module of Rx instance or the main core.

  3. Function returns void.

5.5.1.7. FUNC(void, CDD_FSIRX_CODE) Cdd_FsiRx_DmaDataReceive(Cdd_FsiRx_HWUnitType hwUnitId)

  1. Argument passed to the function are: hwUnitId:Tx instance which Transmits.\

  2. Function transfers received data from Rx internal buffer to corresponding application buffer by using DMA.

  3. Function returns void

5.5.1.8. FUNC(CddFsiRx_StatusType, CDD_FSIRX_CODE) CddFsiRx_GetStatus(void)

  1. This service gets the status if FsiRx driver.

  2. Function returns driver status:

    • CDD_FSI_RX_UNINIT: The Rx module has not initialized yet

    • CDD_FSI_RX_INIT: The Rx module has initialized

    • CDD_FSI_RX_IDLE: The reception through the Rx channel hasn’t started

    • CDD_FSI_RX_BUSY: The frame reception has been started and is still going on

    • CDD_FSI_RX_COMPLETED: The current reception has been completed

5.5.2. CDD FSI RX API’s with Service ID

The following table presents the service IDs and the related services: CDD FSI RX API’s Supported:

Service ID

Service

0x01

Cdd_FsiRx_Init

0x02

Cdd_FsiRx_GetVersionInfo

0x03

Cdd_FsiRx_MainFunction

0x04

Cdd_FsiRx_DeInit

0x05

CddFsiRx_GetStatus

0x06

Cdd_FsiRx_Reset

0x07

Cdd_FsiRx_SetUpBuffer

0x08

Cdd_FsiRx_DmaDataReceive

5.6. CDD FSITX

5.6.1. Description of the CDD FSI TX API’s

All below mentioned API’s are user accessible and can be found in Cdd_FsiTx.c file

5.6.1.1. FUNC(void, CDD_FSITX_CODE) Cdd_FsiTx_Init(P2CONST(Cdd_FsiTx_ConfigType, AUTOMATIC, CDD_FsiTx_CFG) ConfigurationPtr)

  1. Argument passed to the function is ConfigurationPtr.

  2. Function returns void

  3. Function is used to initialize all configured hardware units at specified frequencies.

  4. Function initializes configuration Parameters to default values.

5.6.1.2. FUNC(void, CDD_FSITX_CODE) Cdd_FsiTx_DeInit(void)

  1. Function used to de-initialize all initialized Fsi Tx Hardware Units

  2. Function returns void

  3. Function can not be called in case driver is uninitialized

5.6.1.3. FUNC(void, CDD_FSITX_CODE) Cdd_FsiTx_GetVersionInfo(P2VAR(Std_VersionInfoType, AUTOMATIC, CDD_FSI_TX_APPL_DATA) VersionInfoPtr)

  1. Argument passed to the function is a valid pointer of type Std_VersionInfoType

  2. Function stores Version information in pointer

  3. Function returns void

5.6.1.4. FUNC(Std_ReturnType, CDD_FSITX_CODE) Cdd_FsiTx_BufferLoad(Cdd_FsiTx_HWUnitType hwUnitId, P2VAR(Cdd_FsiTx_DataBufferType, AUTOMATIC, CDD_FSI_TX_APPL_DATA) SrcBufferPtr,Cdd_FsiTx_DataType Cdd_FsiTx_userData, Cdd_FsiTx_DataLengthType TxDataLength)

  1. Argument passed to the function are:

    • hwUnitId:Tx instance which Transmits.

    • SrcBufferPtr: Pointer to the Data Buffer from which data has to be copied

    • Cdd_FsiTx_userData:User Specific 8 bit value passed from application for each frame.

    • TxDataLength:Number of words in each Frame.

  2. Function copies data from the source pointer to internal Transmit buffer of Fsi Tx instance.

  3. Function returns E_OK/E_NOT_OK.

5.6.1.5. FUNC(Std_ReturnType, CDD_FSITX_CODE) Cdd_FsiTx_Transmit(Cdd_FsiTx_HWUnitType hwUnitId, Cdd_FsiTx_UserDataType userData, Cdd_FsiTx_DataLengthType TxDataLength)

  1. Argument passed to the function are:

    • hwUnitId:Tx instance which Transmits.

    • Cdd_FsiTx_userData:User Specific 8 bit value passed from application for each frame.

    • TxDataLength:Number of words in each Frame.

  2. Function initiate the transmission of data from Tx Transmission buffer to Rx Internal reception Buffer.

  3. Function returns E_OK/E_NOT_OK.

5.6.1.6. FUNC(Std_ReturnType, CDD_FSITX_CODE) Cdd_FsiTx_MainFunction(void)

  1. The API is used in Polling Mode only.

  2. The main function API Polls whether the transmission status flags are set for each instance to ensure the data transmission.

  3. Function returns E_OK/E_NOT_OK.

5.6.1.7. FUNC(Std_ReturnType, CDD_FSITX_CODE) Cdd_FsiTx_Ping(Cdd_FsiTx_HWUnitType hwUnitId)

  1. Argument passed to the function are:

    • hwUnitId:Tx instance which Transmits.

  2. Function initiates the transmission of a Ping Frame(Frame without Data) to the Rx to verify the physical connection between Tx and Rx instances.

  3. Function returns E_OK/E_NOT_OK.

5.6.1.8. FUNC(void, CDD_FSITX_CODE) Cdd_FsiTx_Reset(Cdd_FsiTx_HWUnitType hwUnitId, VAR(Cdd_FsiTx_ResetSubModuleType, AUTOMATIC) ResetModule)

  1. Argument passed to the function are:

    • hwUnitId:Tx instance which Transmits.

    • ResetModule: This argument specifies where the reset happens. Example:, Main Core Reset, Ping Timer Reset,Clock Reset

  2. Function resets either sub modules or main core in the Tx instance.

  3. Function returns E_OK/E_NOT_OK.

5.6.1.9. FUNC(Cdd_FsiTx_StatusType, CDD_FSITX_CODE) CddFsiTx_GetStatus(void)

  1. This service gets the status if FsiTx driver.

  2. Function returns driver status:

    • CDD_FSI_TX_UNINIT: The Tx module has not initialized yet

    • CDD_FSI_TX_INIT: The Tx module has initialized

    • CDD_FSI_TX_IDLE: The transmission through the Tx channel hasn’t started

    • CDD_FSI_TX_BUSY: The frame transmission has been started and is still going on

5.6.2. CDD FSI TX API’s with Service ID

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

CDD FSI TX API’s Supported:

Service ID

Service

0x01

Cdd_FsiTx_Init

0x02

Cdd_FsiTx_GetVersionInfo

0x03

Cdd_FsiTx_Ping

0x04

Cdd_FsiTx_BufferLoad

0x05

Cdd_FsiTx_Transmit

0x06

Cdd_FsiTx_MainFunction

0x07

Cdd_FsiTx_DeInit

0x08

Cdd_FsiTx_Reset

5.7. CDD I2C

5.7.1. Description of the API’s

All below mentioned API’s are user accessible and can be found in Cdd_I2c.c file

5.7.1.1. void Cdd_I2c_Init( Cdd_I2c_ConfigPtrType* configPtr)

  1. Argument passed to the function in NULL_PTR

  2. Function returns void

  3. Function is used to initialize all configured hardware units at specified frequencies

  4. Function initializes queue to default values

5.7.1.2. Std_ReturnType Cdd_I2c_DeInit(void)

  1. Function used to de-initialize all initialized I2c Hardware Units

  2. Returns success upon successful initialization

  3. Function can not be called in case driver is uninitialized

5.7.1.3. void Cdd_I2c_GetVersionInfo(Cdd_I2c_VersionInfoPtrType * versionInfoPtr)

  1. Argument passed to the function is a valid pointer of type Cdd_I2c_VersionInfoPtrType

  2. Function stores Version information in pointer

  3. Function returns void

5.7.1.4. Std_ReturnType Cdd_I2c_SetupEB(I2c_ChannelType channelId, Cdd_I2c_DataPtrType txDataBufferPtr, Cdd_I2c_DataPtrType rxDataBufferPtr, Cdd_I2c_DataLengthType length)

  1. Function sets up buffer for reception or transmission based on pre-configured channel ID’s passed as argument

  2. Buffer pointer to store data for transmission/reception passed as argument

  3. Length of message to read or write to slave device passed as argument

  4. Both buffers can not be passed as NULL_PTR

  5. Both buffers can not be passed as valid pointers

  6. Pre-configured direction of the channel set up in the GUI should be maintained here as well to avoid development errors

  7. Function returns success or failure

5.7.1.5. Std_ReturnType Cdd_I2c_SetupEBDynamic(I2c_ChannelType channelId, Cdd_I2c_AddressType address, Cdd_I2c_DataPtrType txDataBufferPtr, Cdd_I2c_DataPtrType rxDataBufferPtr, Cdd_I2c_DataLengthType length)

  1. Function to set up buffer for reception or transmission of channel based on pre- configured channel ID’s passed as argument with a re-configurable slave address at run time

  2. Buffer pointer to store data for transmission/reception passed as argument

  3. Both Buffers can not be passed as NULL_PTR

  4. Both buffers can not be passed as valid pointers

  5. Valid slave address to be passed as an argument

  6. Pre-configured direction of the channel set up in the GUI should be maintained here as well to avoid development errors

  7. Function returns success or failure

5.7.1.6. Std_ReturnType Cdd_I2c_AsyncTransmit(I2c_SequenceType sequenceId)

  1. Function use to transmit a sequence to receive/transmit data on the I2c bus

  2. Sequence ID passed as parameter to the function

  3. Transmission through this function can take place in both polling mode as well as interrupt mode

  4. Reception through this function can only take place in interrupt mode

  5. In case a sequence is not completed due to some reason, it is queued

  6. Function returns success or failure

5.7.1.7. Std_ReturnType Cdd_I2c_Cancel(I2c_SequenceType sequenceId)

  1. Function used to dequeue a sequence in queue

  2. Sequence ID passed as argument

  3. An ongoing sequence in transmission from queue can not be cancelled

  4. Function returns success or failure

5.7.1.8. Cdd_I2c_ChannelResultType Cdd_I2c_GetResult(I2c_ChannelType channelId)

  1. Function returns the channel result upon call, results depends on completion, failure or processing of a channel

  2. Channel ID passed as a parameter

  3. Function returns CDD_I2C_CH_RESULT_OK/CDD_I2C_CH_RESULT_NOT_OK/CDD_I2C_CH_RESULT_IN_PROGRESS/CDD_I2C_CH_RESULT_BUSFAIL/CDD_I2C_CH_RESULT_ARBFAIL/CDD_I2C_CH_RESULT_NACKFAIL

5.7.1.9. Cdd_I2c_SeqResultType Cdd_I2c_GetSequenceResult(I2c_SequenceType sequenceId)

  1. Function returns the sequence result, result depends upon completion, failure or processing of a sequence

  2. Sequence ID passed as a parameter

  3. Function returns CDD_I2C_SEQ_OK/CDD_I2C_SEQ_NOT_OK/CDD_I2C_SEQ_PENDING/CDD_I2C_SEQ_QUEUED/CDD_I2C_SEQ_NACK/CDD_I2C_SEQ_FAILED/CDD_I2C_SEQ_CANCELLED

5.7.1.10. void Cdd_I2c_MainFunction(void)

  1. Function used to process all the sequences in Queue and update sequence status accordingly

  2. Function returns void

  3. Function should be called periodically at the end

5.7.1.11. void Cdd_I2c_PollingModeProcessing(void)

  1. Function used to receive data from the I2c bus in polling mode

  2. Function returns void

  3. Function process all sequences and receives data for all channels configured for read in one call

  4. Only to be used in polling mode

5.7.1.12. void Cdd_I2c_SetHandling(Cdd_I2c_HandlingType handling)

  1. Function used to handle arbitration loss condition

  2. Handling parameter configured through GUI passed as argument

  3. Function can either attempt to recover the bus control or detach from the bus after de-initializing the driver depending on the argument passed

  4. Input parameter for function are CDD_I2C_BURST_MODE/CDD_I2C_RECURRENT_MODE

5.7.1.13. Cdd_I2c_ComponentStatusType Cdd_I2c_GetStatus(void)

  1. Function used to return driver status

  2. Requires no argument to be passed

  3. Function returns CDD_I2C_UNINIT/CDD_I2C_IDLE/CDD_I2C_BUSY

5.7.2. Type definitions

The external visible and usable types defined by the I2C are described in this chapter.

TypeName

C-Type

Description

Value Range

Cdd_I2c_ComponentStatusType

enum

States of the I2C driver

I2C_UNINIT- driver is not initialized
I2C_IDLE- driver is initialized and ready
I2C_BUSY- driver is processing at least one sequence’s transmission process

Cdd_I2c_ChannelResultType

enum

The result of a channel

I2C_CH_RESULT_OK- channel has finished successfully
I2C_CH_RESULT_BUSFAIL- bus failure detected
I2C_CH_RESULT_ARBFAIL- arbitration failure detected
I2C_CH_RESULT_NACKFAIL- nack failure detected

Cdd_I2c_HW_cfg

enum

Structure for CDD_I2C which contains Hw unit initialization parameters

System clock frequency being used by the I2C instance

Cdd_I2c_SeqResultType

enum

States of the sequence

I2C_SEQ_OK- sequence finished normal
I2C_SEQ_PENDING- a sequence is in progress or queued
I2C_SEQ_QUEUED- sequence is queued
I2C_SEQ_NACK- sequence encountered a NACK signal
I2C_SEQ_FAILED- sequence failed due to error
I2C_SEQ_CANCELLED- sequence was cancelled by request

Cdd_I2c_HandlingType

enum

Variants of timeout handling

I2C_BURST- no timeout observation
I2C_RECURRENT- perform countermeasure in case of timeout

Cdd_I2c_AddressType

uint16

Address for bus clients

16 bits

Cdd_I2c_DataType

uint8

Data format of the I2c used for transmission and reception

8 bits

Cdd_I2c_DataLengthType

uint16

Type for any length Parameter

16 bits

Cdd_I2c_DataPtrType

uint8 *

Pointer type for general buffer handling

32 bits

Cdd_I2c_DataConstPtrType

const uint8 *

Pointer type for TX buffer handling

32 bits

Cdd_I2c_SequenceType

uint8

Type for sequence identifier

8 bits

Cdd_I2c_ChannelType

uint8

Type for channel identifier

8 bits

5.7.3. Services used by I2C driver

Service ID

Service

0x00

CDD_I2C_Init

0x01

CDD_I2c_DeInit

0x02

CDD_I2c_GetVersionInfo

0x03

CDD_I2c_SetupEB

0x04

CDD_I2c_SetupEBDynamic

0x05

CDD_I2c_AsyncTransmit

0x06

CDD_I2c_Cancel

0x07

CDD_I2c_GetResult

0x08

CDD_I2c_GetSequenceResult

0x09

CDD_I2c_MainFunction

0x0A

CDD_2c_PollingModeProcessing

0x0B

Cdd_I2c_SetHandling

5.8. CDD IPC

5.8.1. Description of the Api’s

  1. Cdd_Ipc_Init : This API will act as Service for CDD IPC Initialization.

  2. Cdd_Ipc_DeInit : This API will act as Service for deinitializing CDD IPC.

  3. Cdd_Ipc_Notify_RegisterClient : This API will act as Service to register a client for IPC.

  4. Cdd_Ipc_Notify_UnregisterClient : This API will act as Service to un-register a client for IPC.

  5. Cdd_Ipc_Notify_Write : This API will act as Service to write ipc notify message.

  6. Cdd_Ipc_Construct : Used to Create a RPMessage object to receive messages at a specified end-point

  7. Cdd_Ipc_Destruct : This API will act as Service to delete a previously created RPMessage object

  8. Cdd_Ipc_RpMsg_SendMsg : This API will act as Service to Send a message to a remote core at a specified remote end point

  9. Cdd_Ipc_RpMsg_RecvMsg : Blocking API to wait till a message is received from any CPU at the specified local end point.

  10. Cdd_Ipc_Notify_SyncAll : This API will act as Service to sync all the cores that are participating in the IPC.

5.8.2. API’s with Service ID

Service ID

Service

0x01

Cdd_Ipc_Init

0x02

Cdd_IpcGetVersionInfo

0x03

Cdd_Ipc_RpMsg_RecvMsg

0x04

Cdd_Ipc_RpMsg_SendMsg

0x05

Cdd_Ipc_Notify_RegisterClient

0x06

Cdd_Ipc_Construct

0x07

Cdd_Ipc_DeInit

0x09

Cdd_Ipc_Notify_UnregisterClient

0x0A

Cdd_Ipc_Destruct

5.9. CDD PWM

5.9.1. Description of the API’s

Will be updated in future release

5.9.2. API’s with Service ID

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

Service ID

Service

0x0U

Cdd_Pwm_Init

0x1U

Cdd_Pwm_DeInit

0x2U

Cdd_Pwm_StartChannelCounter

0x3U

Cdd_Pwm_StopChannelCounter

0x5U

Cdd_Pwm_SetPinAction

0x6U

Cdd_Pwm_GetCounter

0x7U

Cdd_Pwm_SetAbsoluteThreshold

0x8U

Cdd_Pwm_SetRelativeThreshold

0x4U

Cdd_Pwm_GetCounterStatus

0x15U

Cdd_Pwm_ClearCounterStatus

0x2CU

Cdd_Pwm_CounterComparatorCfg

0x09U

Cdd_Pwm_DisableNotification

0x0AU

Cdd_Pwm_EnableNotification

0x16U

Cdd_Pwm_EtIntrStatus

0x17U

Cdd_Pwm_EtIntrClear

0x18U

Cdd_Pwm_EtGetEventCount

0x19U

Cdd_Pwm_SetAdcTrigger

0x1BU

Cdd_Pwm_TzTripEventEnable

0x1CU

Cdd_Pwm_TzTripEventDisable

0x1DU

Cdd_Pwm_TzIntrEnable

0x1EU

Cdd_Pwm_TzIntrDisable

0x1FU

Cdd_Pwm_TzGetEventStatus

0x20U

Cdd_Pwm_TzEventStatusClear

0xEU

Cdd_Pwm_SetPeriodDutyPhase

0xFU

Cdd_Pwm_SetOutputToIdle

0x2AU

Cdd_Pwm_SyncEnable

0x2BU

Cdd_Pwm_SyncDisable

0x10U

Cdd_Pwm_DeadbandCfg

0x11U

Cdd_Pwm_DeadbandBypass

0x12U

Cdd_Pwm_ChopperCfg

0x13U

Cdd_Pwm_ChopperEnable

0xDU

Cdd_Pwm_RegisterReadback

0xBU

Cdd_Pwm_GetVersionInfo

0x21U

Cdd_Pwm_HrSetPeriodDutyPhase

0x22U

Cdd_Pwm_HrSfoCalibration

0x23U

Cdd_Pwm_HrSfoStatus

5.10. CDD UART

5.10.1. API Definition

  1. Cdd_Uart_Init

  2. Cdd_Uart_DeInit

  3. Cdd_Uart_Write

  4. Cdd_Uart_Read

  5. Cdd_Uart_Cancel

  6. Cdd_Uart_GetRemainingWords

  7. Cdd_Uart_GetVersionInfo

  8. Cdd_Uart_RegisterReadback

5.10.2. API’s with Service ID

Service ID

Service

0x01

Cdd_Uart_Init

0x02

Cdd_Uart_GetVersionInfo

0x03

Cdd_Uart_DeInit

0x04

Cdd_Uart_Write

0x05

Cdd_Uart_Read

0x06

Cdd_Uart_Cancel

0x07

Cdd_Uart_GetRemainingWords

0x08

Cdd_Uart_RegisterReadback

5.11. DIO

5.11.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

5.11.2. API’s with Service ID

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

Autosar API’s Supported:

Service ID

Service

0x00

Dio_ReadChannel

0x01

Dio_WriteChannel

0x02

Dio_ReadPort

0x03

Dio_WritePort

0x04

Dio_ReadChannelGroup

0x05

Dio_WriteChannelGroup

0x11

Dio_FlipChannel

0x12

Dio_GetVersionInfo

5.11.3. Description on Non Standard API’s

None

5.12. ETH

5.12.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

5.12.2. API’s with Service ID

The following table presents the list of API’s:

Service ID

Autosar API’s Supported

Comments

0x01

Eth_Init

0x03

Eth_SetControllerMode

0x04

Eth_GetControllerMode

0x05

Eth_WriteMii

0x06

Eth_ReadMii

0x08

Eth_GetPhysAddr

0x09

Eth_ProvideTxBuffer

Priority/QoS option not supported.

0x0A

Eth_Transmit

0x0B

Eth_Receive

Priority/QoS option not supported.

0x0C

Eth_TxConfirmation

0x0D

Eth_GetVersionInfo

0x12

Eth_UpdatePhysAddrFilter

0x13

Eth_SetPhysAddr

0x14

Eth_GetCounterValues

0x15

Eth_GetRxStats

0x16

Eth_GetCurrentTime

0x17

Eth_EnableEgressTimeStamp

0x18

Eth_GetEgressTimeStamp

0x19

Eth_GetIngressTimeStamp

0x1C

Eth_GetTxStats

0x1D

Eth_GetTxErrorCounterValues

0x20

Eth_MainFunction

0x50

Eth_SetBandwidthLimit

0x51

Eth_GetBandwidthLimit

Refer Autosar SWS for API description mentioned in above table.

5.12.3. Description on Non Standard API’s

Eth_SetBandwidthLimit API

This function is Non- Autosar based and is used to set a bandwidth limit on a specific channel for traffic shaping.

Eth_GetBandwidthLimit API

This function is Non- Autosar based and is used to get a bandwidth limit on a specific channel for traffic shaping.

5.13. ETHTRCV

5.13.1. Description of the API’s

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

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

Autosar API’s not Supported

0x01

EthTrcv_Init

0x03

EthTrcv_SetTransceiverMode

0x04

EthTrcv_GetTransceiverMode

0x05

EthTrcv_StartAutoNegotiation

0x06

EthTrcv_GetLinkState

0x07

EthTrcv_GetBaudRate

0x08

EthTrcv_GetDuplexMode

0x09

EthTrcv_ReadMiiIndication

0x0A

EthTrcv_WriteMiiIndication

0x0B

EthTrcv_GetVersionInfo

0x0C

EthTrcv_MainFunction

0x10

EthTrcv_GetPhySignalQuality

0x11

EthTrcv_SetPhyTestMode

0x12

EthTrcv_SetPhyLoopbackMode

0x13

EthTrcv_SetPhyTxMode

0x14

EthTrcv_GetCableDiagnosticsResult

0x15

EthTrcv_GetPhyIdentifier

0x0D

EthTrcv_SetTransceiverWakeupMode

0x0E

EthTrcv_GetTransceiverWakeupMode

0x0F

EthTrcv_CheckWakeup

Refer Autosar SWS for API description mentioned in above table.

5.13.3. Description on Non Standard API’s

Not Applicable.

5.14. FLS

5.14.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

5.14.2. API’s with Service ID

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

Autosar API’s Supported:

Service ID

Service

0x00

Fls_Init

0x01

Fls_Erase

0x02

FLS_Write

0x03

FLS_Cancel

0x04

FLS_GetStatus

0x05

Fls_GetJobResult

0x07

FLS_Read

0x08

FLS_Compare

0x10

Fls_GetVersionInfo

0x0A

FLS_BlankCheck

0x06

FLS_MainFunction

Autosar API’s not Supported:

Service ID

Service

0x09

Fls_SetMode

Refer Autosar SWS for API description mentioned in above table.

5.15. GPT

5.15.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

5.15.2. API’s with Service ID

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

Service ID

Service

0x00

Gpt_GetVersionInfo

0x01

Gpt_Init

0x02

Gpt_DeInit

0x03

Gpt_GetTimeElapsed

0x04

Gpt_GetTimeRemaining

0x05

Gpt_StartTimer

0x06

Gpt_StopTimer

0x07

Gpt_EnableNotification

0x08

Gpt_DisableNotification

5.15.3. Description on Non Standard API’s

Gpt_RegisterReadback API–This function is non-autosar based and is used to read the data in the registers of GPT if we keep GPT_REGISTER_READBACK_API Macro as ON.

5.16. ICU

The AUTOSAR BSW ICU Driver specification details the APIs required for Icu Driver. Please refer to SWS of ICU for detailed API description. APIs related to wakeup capability are not implemented.

5.16.1. Non Standard Service APIs

As noted from the previous MCAL implementation, some of the critical configuration registers could potentially be corrupted by other entities (s/w or h/w). One of the recommended detection methods would be to periodically read-back the configuration and confirm configuration is consistent. The service API defined below shall be implemented to enable this detection.

Description

Comments

Service Name

Icu_RegisterReadback

Syntax

Icu_RegisterReadback(Icu_ChannelType Channel,P2VAR(Icu_RegisterReadbackType, AUTOMATIC, ICU_APPL_DATA) RegRbPtr)

E_OK: Register read back has been done,
E_NOT_OK: Register read back failed
Icu_RegisterReadbackType defines the type, that holds critical

Parameter in

Channel

Numeric identifier of the ICU channel

Asyn/Syn

Sync

NA

Re-entrancy

Non Reentrant

NA

Parameter out

RegRbPtr

A pointer of type Icu_RegisterReadbackType, which holds the read back values

Parameter out

Std_ReturnType

E_OK or E_NOT_OK in case of Icu not initialized or NULL buffer pointer

5.17. LIN

5.17.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

5.17.2. API’s with Service ID

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

Service ID

Service

0x00

Lin_Init

0x01

Lin_GetVersionInfo

0x04

Lin_SendFrame

0x06

Lin_GoToSleep

0x07

Lin_Wakeup

0x08

Lin_GetStatus

0x09

Lin_GoToSleepInternal

0x0a

Lin_CheckWakeup

0x0b

Lin_WakeupInternal

5.17.3. Description on Non Standard API’s

None

5.18. MCU

5.18.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

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

5.18.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 ).

5.19. PORT

5.19.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

5.19.2. List of API’s

The following table presents the list of API’s:

Service ID

Autosar API’s Supported Service

Autosar API’s not Supported Service

0x00

Port_Init

0x01

Port_SetPinDirection

0x02

Port_RefreshPortDirection

0x03

Port_GetVersionInfo

0x04

Port_SetPinMode

Refer Autosar SWS for API description mentioned in above table.

5.19.3. Description on Non Standard API’s

Port_DeInit API

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

Port_PinEnableIntrNotification API

This function is Non- Autosar based and is used to enable bank/channel GPIO Interrupts for particular channel.

Port_PinDisableIntrNotification API

This function is Non- Autosar based and is used to disable bank/channel GPIO Interrupts for particular channel.

Port_GetInterruptStatus API

This function is Non- Autosar based and is used to collect interrupt register value for each GPIO bank.

Port_ClearInterruptStatus API

This function is Non- Autosar based and is used to clear interrupt register for each GPIO bank.

5.20. PWM

5.20.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

5.20.2. API’s with Service ID

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

Service ID

Service

0x00

Pwm_Init

0x01

Pwm_DeInit

0x02

Pwm_SetDutyCycle

0x03

Pwm_SetPeriodAndDuty

0x04

Pwm_SetOutputToIdle

0x06

Pwm_DisableNotification

0x07

Pwm_EnableNotification

0x08

Pwm_GetVersionInfo

Autosar API’s not Supported:

Service ID

Service

0x09

Pwm_SetPowerState

0x0a

Pwm_GetCurrentPowerState

0x0b

Pwm_GetTargetPowerState

0x0c

Pwm_PreparePowerState

0x05

Pwm_GetOuputState

Refer Autosar SWS for API description mentioned in above table.

5.20.3. Description on Non Standard API’s

Pwm_RegisterReadback API–This function is non-autosar based and is used to read the data in the registers of Pwm if we keep PWM_REGISTER_READBACK_API Macro as ON. and Service Id is 0xD0.

5.21. SPI

5.21.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

5.21.2. API’s with Service ID

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

AUTOSAR API’s Supported:

Service ID

Service

SPI_SID_INIT = 0x00

Spi_Init

SPI_SID_DEINIT = 0x01

Spi_DeInit

SPI_SID_WRITEIB = 0x02

Spi_WriteIB

SPI_SID_ASYNCTRANSMIT = 0x03

Spi_AsyncTransmit

SPI_SID_READIB = 0x04

Spi_ReadIB

SPI_SID_SETUPEB = 0x05

Spi_SetupEB

SPI_SID_GETSTATUS = 0x06

Spi_GetStatus

SPI_SID_GETJOBRESULT = 0x07

Spi_GetJobResult

SPI_SID_GETSEQUENCERESULT = 0x08

Spi_GetSequenceResult

SPI_SID_GETVERSIONINFO = 0x09

Spi_GetVersionInfo

SPI_SID_SYNCTRANSMIT = 0x0A

Spi_SyncTransmit

SPI_SID_GETHWUNITSTATUS = 0x0B

Spi_GetHwUnitStatus

SPI_SID_CANCEL = 0x0C

Spi_Cancel

SPI_SID_SETASYNCMODE = 0x0D

Spi_SetAsyncMode

SPI_SID_MAINFUNCTION_HANDLING = 0x10

Spi_MainfunctionHandling

AUTOSAR API’s not Supported:

None

Refer AUTOSAR SWS for API description per service mentioned in the above table.

5.21.3. Description on Non Standard API’s

None

5.22. WDG

5.22.1. Description of the API’s

Refer the AUTOSAR SWS for API documentation and Type definition.

5.22.2. API’s with Service ID

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

Service ID

Service

0x00

Wdg_Init

0x01

Wdg_SetMode

0x03

Wdg_SetTriggerCondition

0x04

Wdg_GetVersionInfo

0x05

Wdg_Trigger

5.22.3. Description on Non Standard API’s

Wdg_RegisterReadback API–This function is non-autosar based and is used to read the data in the registers of Wdg if we keep Wdg_REGISTER_READBACK_API Macro as ON.