BASIC Flashcards
COM FUNCTIONALITIES
COM Module packs the AUTOSAR signals to I-PDUs which has to be transmitted.
COM Module Unpack the received I-PDUs and provide the received signals to RTE.
COM Module Route the signals from received I-PDUs to transmit I-PDUs (Gateway signal).
E.g.: Receive signal from CAN frame and Transmit to LIN Frame.
COM Module is responsible for starting and stopping of I-PDU groups (Communication transmission control).
COM Module is responsible for giving the periodicity of the transmit frame. It is responsible for Guarantee of minimum distances between transmit I-PDUs.
COM Module is responsible for Monitoring of receive signals (signals timeout).
If any problem while reception of CAN signal, then it update the particular signal by an Invalid value.
So, application will get to know there is some problem in received CAN signal.
COM Module is responsible for initialize the COM signal. Before a Frame is received there should be some Init value for each and every signal.
COM Module is responsible for Endianness conversion.
COM Module is responsible for sign conversion.
Example: -3 will be converted as 1111 1101
binary value of 3 is 0000 0011
2’s compliment - 1111 1101 (Compliment , then last bit inversion).
SIGNAL VALUE
For each and every signal COM can initialize with three values:
Init Value: Initialization value
Normal Value: Valid value received from SWC or PDUR
Data Invalid value: Value in case of any error
SIGNAL INITIALIZATION
INI is done by API Com_lnit()
Value present in parameter (tag) ComSignallnitValue is the value used for initialization.
Unused areas in a frame will be filled with value present in ComTx1PduUnusedAreasDefault
Com Delnit() - after deinitialization of the layer, no communication via the AUTOSAR COM module is possible.
FACTORS USED FOR TRANSMITTING A FRAME
Key factors used for transmitting a frame are:
- ComFilterAlgorithm
- ComTxModeMode
- ComTranferProperty
- Transmission Mode Selection
COM Module is responsible to decide how a frame need to be transmitted.
Like what is the periodicity of the frame, How often fame need to be transmitted What is the Time difference between two frame transmitted sequently.
COM FILTER ALGORITHMS
Autosar COM has ability to filter the received signal values.
There are around 8 filtering Mechanism.
This algorithm will be there for every Received and transmitting COM signal
TRANSMISSION MODE
Transmission mode: Applicable for PDU
Parameter : ComTxModeMode
Direct:
Configure as Direct When particular PDU has to be transmit to SWC whenever COM_SendSignal() API is called from SWC/RTE.
COM_SendSignal() is the API which is used to transmit the signal to COM.
Periodic
Whenever we have to transmit in fixed recurrence of time like 1000ms or 500ms.
Mixed
Combination of Direct and Periodic. It sends in 1000ms as well as when API is called.
None
It is possible to request I-PDUs with ComTxModeMode NONE via Com_TriggerTransmit(Refer CANIF).
TRANSFER PROPERTY
Transfer property: Applicable to signal
Triggered property is possible only for PDU’s with transfer modes Direct or mixed
Parameter : ComTransferProperty
TRIGGERED
Request for Transmission is triggered immediately and requested for value present in ComTxModeNumber0fRepetition times
Whenever COM_SendSignal() API is called from SWC/RTE then that particular PDU will transmit ComTxModeNumber0fRepetition number of times.
TRIGGERED_WITHOUT_REPETITION
Request for Transmission is triggered immediately but no repetition for transmission is requested.
TRIGGERED_ON_CHANGE
If the new sent signal differs to the already stored then transmission request is given and transmission request is repeated for ComTxModeNumber0fRepetitions
If the received value from the application via API COM_SendSignal() different from already transmitted value to other ECU then COM module will trigger the particular PDU for ComTxModeNumber0fRepetitions Times.
TRIGGERED_ON_CHANGE_WITHOUT_REPETITION
if the new sent signal differs to The already stored then transmission request is given and no transmission request is repeated
PENDING
Request for transmission is given periodically
Select this configuration for the PDU whose Transmission mode is selected as Periodic.
TMC and TMS
TMC stands for Transmission mode Condition
TMS stands for transmission mode selection
An IPDU will have more number of signals.
A method was needed to derive IPDU transmission based on the value of the signal
For each IPDU it is possible to have two different methods for transmission which we call as transmission mode selection (TMS). TRUE and FALSE are the two methods of TMS
Values in ComFilter container is used as input for TMC based on which TMS is selected.
If one TMS is sufficient for an IPDU, then ComFilter value for all signals in that IPDU should be ALWAYS
RECEPTION OF AN INVALID SIGNAL
If a invalid signal is received, COM has a mechanism to inform upper layer about invalid value reception
Value in tag ComSignalDataInvalidValue will indicate invalid value for that signal
If invalid value is received there are two types of action Notify, Replace.
Tag name: ComDatalnvalidAction
If the configured ComSignalDatalnvalidValue is received for a signal and the ComDatalnvalidAction is configured to NOTIFY for this signal, the AUTOSAR COM module shall notify the RTE via the configured ComInvalidNotification function. Here normal signal indication to RTE is not passed.
If the configured ComSignalDataInvalidValue is received for a signal and the ComDatalnvalidAction is configured to REPLACE for this signal, the AUTOSAR COM module shall replace the signal’s value by its configured ComSignallnitValue.
Rx SIGNAL INDICATION
Two ways of signal indication to upper modules is possible, Based on tag ComPduSignalProcessing notification is configured for that signal.
1.Immediate:
As soon as updated signal received by COM it will send to RTE via call back function.
2.Deferred
When the updated signal received by COM it set the flag and in next recurrence(10ms,100ms etc..) it will send to RTE call back function.
DEADLINE MONITORING
Deadline monitoring is a mechanism which is used if IPDU is not received within specified time for Rx signal or IPDU transmit confirmation is not received in case of Tx signal.
Tags to be considered for Deadline Monitoring are:
ComFirstTimeout: Timing value is configured in this tag. Suppose value of tag is 100ms and COM periodicity is 10ms. So in first time within 1000ms(100ms*10ms) PDU is not received then corresponding ACTION which need to be done will be taken care that is error reaction which will be configure in deadline monitoring will happen.
ComTimeout : This is subsequent reception of the frame, Suppose value of this tag is 10ms and COM periodicity is 10ms. So within 100ms if that Rx signal is not received then error reaction which will be configure in deadline monitoring will happen.
ComTimeoutNotification: This is for Tx signals. If within the configured time transfer conformation is not received for that particular signal then API which is configured inside the tag will be called. Inside the API developer should do error mechanism.
ComRxDataTimeoutAction : There are 3 set of ACTION which can be done if signal is not received within specified amount of time that ACTION will be decided based on the Value configured in this tag
Monitoring timing will be configured by developer in tag ComFirstTimeout, ComTimeout present in ComSignal container i.e. it is configured for each and every signal. It has to be configure for each and every signal.
If ComTimeout tag is omitted or configured with value 0,then deadline monitoring is disable for that signal.
We can also Enable/Disable deadline monitoring by calling API Com_ReceptionDMControl()
Rx deadline monitoring:
ComRxDataTimeoutAction parameter determines whether the AUTOSAR COM module replaces the signal/ signal group value with the initial value or substitute value or maintains the last received value.
If value of ComRxDataTimeoutAction is REPLACE, then if signal is not received within ComTimeout time COM will replace the signal value with init value configured in ComSignallnitValue.
If value of ComRxDataTimeoutAction is SUBSTITUTE, then if signal is not received within ComTimeout time COM will replace the signal value with value configured in ComTimeoutSubstitutionValue.
If value of ComRxDataTimeoutAction is NONE, then if signal is not received within ComTimeout time COM will not replace the signal value, it will maintain last received value.
Timer used for monitoring will be restarted on every reception of IPDU.
Transmission Deadline Monitoring:
Within ComTimeout time if Tx confirmation is not received then notification is given to application via RTE by calling the function present in ComTimeoutNotification.
Timer is started whenever Com_SendSignaI() API is called for that signal.
IPDU GROUPS
An I-PDU can belong to any I-PDU group or left alone.
Only if it is grouped IPDU can be IPDU start/stop can be controlled.
If an IPDU doesn’t belong to any group then by default IPDU will be started after Com Init is called
SHADOW BUFFER
In AUTOSAR we have provision to group the signal based on the functionality Apart from IPDU buffer COM has shadow buffer which is used by group signals. Ex: Consider there are two group signals signal_a and signal_b, which belong to group_x. Below APIs are used to copy the signal. • TX: /* copy a to shadow buffer */ Com_SendSignal (signal_a, &a); /* copy b to shadow buffer */ Com_SendSignal (signal_b, &b); /* copy shadow buffer to I-PDU*/ Com_SendSignalGroup (group_x); • RX /* copy I-PDU to shadow buffer */ Com_ReceiveSignalGroup (group_x); /* copy a from shadow buffer */ Corn_ReceiveSignal (signal_a, &a); /* copy b from shadow buffer */ Com_ReceiveSignal (signal_b, &b);
UPDATE BIT
Identify whether the sender has updated the data in this signal/ signal group before sending, the AUTOSAR COM module supports update-bits.
The position of the update-bit is configurable by configuration parameter ComUpdateBitPosition.
Update-bit are updated in AUTOSAR COM module
0 - cleared/data has not been updated
1- set/data has been updated
If the RTE updates the value of a signal by calling Com_SendSignal, the AUTOSAR COM module shall set the update-bit of this signal
If the parameter ComTxIPduClearUpdateBit of an I-PDU is configured to Transmit, the AUTOSAR COM module shall clear all update-bits of all contained signals and signal groups after this I-PDU was sent out via PduR_ComTransmit and PduR_ComTransmit returned E_OK.
If the parameter ComTxIPduClearUpdateBit of an I-PDU is configured to Confirmation, the AUTOSAR COM module shall clear all update-bits of all contained signals and signal groups after this I-PDU was sent out via PduR_ComTransmit, PduR_ComTransmit returned E_OK and the I-PDU was successfully confirmed.
If the parameter ComTxlPduClearUpdateBit of an I-PDU is configured to TriggerTransmit, the AUTOSAR COM module shall clear all update-bits of all contained signals and signal groups after the contents of this I-PDU was successfully requested by Com_TriggerTransmit If a signal or signal group with an attached update bit is received, the AUTOSAR COM module shall only process this signal, i.e. filter, notification, signal based gateway, if the signal's update bit is set Update bits do not have to reside in the I-PDU in a fixed relationship to the signal/signal group with which they are associated. The update bits could reside anywhere in the I-PDU data.
GATEWAY SIGNAL
The AUTOSAR COM module shall forward signals to be routed from received I-PDUs to transmit I-PDUs. Configuration is done inside container ComGwMapping The ComGwMapping configuration allows to configure routing a signal/ signal group from one source signal/ signal group to zero (no signal gateway functionality) or more destinations (1:n). Even for gateway signals deadline monitoring, endianness conversion is done If the received signal/ signal group have update-bit (ComUpdateBitPosition) configured, and the update bit of the received signal/ signal group is not set, the AUTOSAR COM module shall not route this signal/ signal group