Common Interview Questions
Common Interview Questions
CAN Arbitration is nothing but the node trying to take control of the CAN bus. Let us
take an example to understand the arbitration in CAN.
Suppose there are two nodes and they start transmitting at the same time both will
transmit SOF bit at the same time this will have no effect on arbitration. After that, they start
transmitting identifier.
Each node transmits a bit and then observes the bus if the sent data sensed on the
bus, then it continues to transmit the identifier. When the nodes observes that the bit it
transmitted and the bit it sensed back are not same it knows that a higher priority message is
being transmitted on the bus and it starts listening and stops transmitting.
It happens because in case of different bits the node with lower identifier will continue
transmitting as it will drive the bus to dominant state (logical 0) while the other node that
intends to keep it in default state (recessive state, logical 1), will read back the dominant state
on the bus and stop transmitting. This mechanism thus preserves the data as the frame with
lower priority is not corrupted due to simultaneous transmissions.
3. What is Bit stuffing?
Bit stuffing is the insertion of non information bits into data.
CAN use a Non-Return-to-Zero protocol, NRZ-5, with bit stuffing. The idea behind bit
stuffing is to provide a guaranteed edge on the signal so the receiver can resynchronize with
the transmitter before minor clock discrepancies between the two nodes can cause a
problem. With NRZ-5 the transmitter transmits at most five consecutive bits with the same
value. After five bits with the same value (zero or one), the transmitter inserts a stuff bit with
the opposite state.
4. Can Standard CAN & Extended CAN coexist in the same network? Who will win
the arbitration if first arbitration field is same?
Yes CAN standard and Extended may co-exist in the same network. CAN only Arbitration
field in the extended frame format only differ from the standard CAN means extended CAN
architecture designed in such a way that standard and extended CAN coexist on the same
network. In extended frame format, the IDE bit distinguish between the standard and
extended CAN. IDE bit is dominant(1) for the Standard frame and recessive for the extended
frame.so standard frame will win arbitration if both have the same 1st identifier field(11-bit).
5. What happens when 2 CAN Nodes are sending the same identifier at the same
time?
The CAN Frame identifier should be unique across the entire network. Assigning the
same identifier to two CAN nodes should lead to a configuration error.
6. What is the difference between Standard CAN & Extended CAN Frames?
• The identifier bit length of standard CAN is 11 and for extended CAN 29.
• IDE bit for standard CAN 0 and for extended CAN 1.
6 (0’s) 8 (1’s)
Interframe Space
This is a form of separation between 2 frames for Data and Remote Frames. There are
two types of Interframe spaces.
• The normal Interframe space consists of Intermission and Bus idle. Intermission has 3
recessive bits and Bus Idle is also a recessive bit that signals that nodes can compete
for the bus now
• For error passive node, after the Intermission field, 8 recessive bits of Suspend
Transmission is sent before Bus idle is sent.
The sender monitors the bus. If the value found on the bus is different from the one
that is sent, then a BIT ERROR is detected
The sender monitors the bus. If the value found on the bus is different from the one
that is sent, then a BIT ERROR is detected
STUFF ERROR
CRC ERROR
Detected by the receiver if the received CRC field does not match the computed value
FORM ERROR
Detected when a fixed format field contains unexpected values
ACKNOWLEDGEMENT ERROR
Detected by the transmitter if a dominant value is not found in the ack slot
Diagnostics
1. What are the Service ID's used in your project?
0x10,0x11,0x27,0x3E,0x22,0x2E
2. Which Service is used to enter into different Session and explain about the sub
functions?
Diagnostic Session Control service is used.
There are many services but not all are accessible until ECU is not running in its
compatible session like some services are accessible in default session and some required ECU
extended session and some for programming. It is decided by the vehicle manufacturer. On
ECU start, ECU runs in default session and that time Client can access only that services of the
server those are allowed by the Manufacturer UDS specification.
01-Default Session
02-Programming session
Requesting the ECU to report Most Recent Confirmed DTC or all Supported DTCs the
diagnostic tool shall use the format defined in the Table below.
5. How to create NRC12,13 etc?
NRC 12- Sub function not supported (Requesting for a wrong sub function)
NRC 13- Incorrect message length or invalid format (Requesting with the wrong PCI)
Request: 0x03 0x10 0x01 0x10 (PCI must be 02 for SID 0x10)
• Start routine – Initiate any service and used to indicate start/completion of any service
• Stop routine – Through this sub-function Client can interrupt running service at any
time inside server.
• Requestroutineresult– It is basically a request message by client to get the result of
service from server.
Example:
Suppose you want to erase data of flash memory prior to download.let as per OEM
specification
8. Which Service ID is used to download and upload data bytes and explain about
the its sub functions?
Upload service(0x35)
The RequestUpload service is used by the client to initiate a data transfer from the
server to the client (upload). After the server has received the requestUpload request
message, the server shall take all necessary actions to send data before it sends a positive
response message.
Download service(0x34)
The requestDownload service is used by the client to initiate a data transfer from the
client to the server (download). After the server has received the requestDownload request
message, the server shall take all necessary actions to receive data before it sends a positive
response message.
A session for handling the boot loader of the ECU for flashing and reprogramming
operations.
Extended session
15. Which conditions can perform hard reset and soft reset?
Software update, update on memory locations- soft reset
16. How can we relate diagnostic session control with Tester present?
Tester present is used to extend the timing of the sessions like programming and extended.
17. Differences between snapshot and extended data record by DTC number?
DTC Snapshot Data (FreezeFrames)
The retrieval of measured values is already possible without DTC via the ReadDataByIdentifier
UDS service. For a meaningful analysis, the measured values must also match the exact time
of the triggering event. If a monitor reports “Failed”, the relevant DIDs are temporarily stored
with their measured values. The data structure of a snapshot record corresponds to a
sequence of individual DIDs from the ReadDataByIdentifier service. There is a large overlap
with ODX. If the DID used for a DTC and their data structures are known, the ODX data for
readDataByIdentifier and readDTC can be generated from the DEXT information and vice
versa.
Extended Data
The Extended Data Block contains additional information about a DTC such as cycle
counters, aging counters, time of last occurrences, … and dynamic data of algorithms that
are not already contained in the FreezeFrame data. Similar to the DIDs, a 1-byte record
number specifies the data structure of the Extend-ed Data block.
Up to 255 stored ExtendedDataRecords can exist for a DTC. The interpretation of the data is
unambiguously determined by its RecordNumber.
Stop routine – Through this sub-function Client can interrupt running service at any time
inside server.
22. Why 7F has considered for -“ve response why not other than 7F?
Standard
CAPL
1. What is System & environmental variables in CAPL script?
Variable in CANoe kernal level are called System variable(global) and configuration level are
called Environment variable(fast, local).
Output(msg)
Key events
Error events
Timer events
System events
Examples are:
onMessage{}
on key {}
on error {}
on busOff {}
17. What are the following rules when inserting an include files?
#include<filename.cin>
18. How to access signal from message in CAPL?
• messasevariable.signalName
• $signalName
on start
on timer timer1
22. Types of system events? What happens when a system event occurs?
CAPL provides event procedures to execute actions before, at the start of, and after
CANalyzer or CANoe measurements. Their names correspond to when they are used, and they
only execute once in each measurement.
• Division by zero
• Exceeding the upper or lower limits of the offset in the data range of messages
If a run-time error is detected, the intrinsic (built-in) function runError() is called. This
stops the measurement and outputs information to the Write window with the name of the
CAPL program, the type of error and an error number. The output in the Write window might
look like the following:
Locate with CAPL browser option: Find runError - err number -> 1.
Unknown error
measurement stopped
The error number helps to find the place in the CAPL source code that generated the
error.
The line that begins with Locate… reports the error number (in this example, the error
number, is 1). Using the Compiler menu, select the Find runtime error command and enter
the error number.
The CAPL Browser will then show you where this run-time error occurred. The user
can also manually invoke the CAPL function runError() in the code to generate meaningful
outputs. When using the runError() function in your CAPL programs or when an internal run-
time error is generated, a message is displayed in the Write window with an error number.
Different errors generate different messages.
CANoe
1. Where do need to configure and measure CAN log?
Measurement setup -> Logging window
2. Advantage of CANoe?
CANoe tool is used to simulate, analyse and test ECU’s and networks.
6. What is purpose of Test Setup and how to perform more than one test cases?
In principle, test modules can be used both in the simulation setup and in the test
setup. However, the test setup, as the name implies, is the preferred location for tests. In the
test setup the test modules are not assigned to specific buses, because it may be assumed
that tests relate to the total system. To make it easy to reuse prepared tests even after the
simulation model is changed (e.g. a new version of the simulation model is introduced), the
test setup may be saved and reloaded separately.
Similarly, the test setup offers a few advanced options such as consecutive execution
of multiple test modules and merging of test reports from different test modules. These
functions do indeed simplify working with multiple test modules, but they do not represent a
modularization concept for testing (distribution of tests among individual test modules). Test
cases that belong together and are always executed together should reside within a single test
module.
• In the simulation setup go to networks select the database, right click on it, select add.
• select particular database and click open.
9. Is it possible to simulate other ECU's Except Test ECU without CAPL Scripting in
CANoe tool?
Yes we can through IG block we can give manually the other ECU’s messages and we
can make the test ECU to work manually using IG block.
10. How to configure diagnostic files in canoe and CDD files means?
Diagnostic files can be configured
11. How many can database files are required for CAN Network simulation in CANoe
tool?
Minimum it requires one and there is no limitation on maximum number of DBC.
15. How to change the baud rate in CANoe without changing the code?
CANoe -> Hardware -> Network hardware
16. How to automate test sequence using test module?
In CANoe the test module is the execution unit for tests. A test module is always
started for test execution, and the results of this execution are represented by exactly one
test report. The test module contains the test cases. The test case is the central concept, in
which the actual testing actions are collected. These in turn are organized by test steps. A test
step is simply a piece of information indicating that the test sequence has reached a specific
point.
The test case contains the actual instructions for test execution. If at all possible, test
cases should be set up so that they work independently of all other test cases. Test cases are
executed as part of a test module that includes other test cases as well, but they are developed
and maintained independently of one another (see chapter 3.0 on Test Management
Systems). The testing actions that serve to test a property or capability of the ECU under test
are formulated in a test case.
For example, the entire network management of an ECU consists of a large number
of properties and functions. Each of these properties and functions should be checked in a
separate test case. E.g. the tester would formulate a separate test case for regular startup of
the system, for handling a specific fault situation and so on. one would not test the entire
Network Management of an ECU in a test case, since it consists of a large number of properties
and functions. Instead one would handle each of these properties in a separate test case, e.g.
by formulating a separate test case for regular startup of the system or for handling a specific
fault situation.
In the test report the executed test cases are listed with their results. These executed
test cases may be structured in the test report according to test groups. Test groups are mainly
an organizational category for the executed test cases. Like the titles of chapters in a book,
the test groups may be created hierarchically, whereby the executed test cases would be the
leaves on the tree of test groups. Test groups are dynamically defined in CAPL and .NET test
modules. A test case is assigned to a test group by the CAPL/.NET program at run time. In
CAPL/.NET test modules, test cases may be executed a number of times during a test run. A
test case might therefore be documented multiple times in a test report and in various test
groups.
17. What is Real time branch and Evaluation branch in measurement setup?
In real time branch the real ECU is connected and the configuration is executes and the
network has been evaluated. In evaluation branch the Log of the ECU or the partner ECU is
used for the analysis of the network.
22. Explain about different windows in measurement setup such as graphic, trace,
etc?
Trace Window
The Trace window shows the data content of the messages detected on the bus and
other information about them. Each message is time-stamped, and the identifier, message
type, data length, and any associated data bytes are shown. Several CANoe toolbar buttons
are associated with this window. Experiment with the toolbar buttons to see the effects. You
may notice that identifiers can be shown either as decimal or hex or symbolic. Notice that this
use of the CAN message identifier names, rather than using numbers, can be accomplished by
using an associated database file.
CAN Statistics
The CAN Statistics Window displays statistics about CAN bus activities during
measurement. This Statistics Window can be inserted into the Measurement Setup via the
context menus of the relevant function blocks.
Data Window
The Data window shows the current content of message data and is configurable. The
user selects which data items are to be shown, their respective positions in the window, and
how the data content will be represented.
Graphics Window
The Graphics window is similar to the Data window. They both display message data,
but instead of displaying numeric data, the Graphics window actually plot those numeric
message data into a graph. This window is also configurable and has a wide assortment of
associated toolbar controls for graph evaluation. Multiple signals can be graphed with
independent time axis, signal position, signal unit, and signal color.
Logging Window
It helps to configure the log file and it’s properties. Logging helps to store the data
which is being transmitted.
V&V Lifecycle
1. What is smoke testing, sanity testing, regression testing?
Smoke Testing
Smoke testing is an approach which is usually carried out during the initial
development stages of the Software Development Life Cycle(SDLC) to make sure that the core
functionalities of a program are working fine without any issues. It is executed before any
detailed functional tests are done on the software.
The main intent of smoke testing is not to perform deep testing but to verify that the
core or main functionalities of the program or the software are working fine. Smoke testing
aims to reject a badly broken build in the initial stage so that the testing team does not waste
time in installing & testing the software application.
The main focus of smoke testing is to test the critical areas and not the complete application.
• When developers provide a fresh build to the QA team. A fresh build here means
when the build has new changes made by the developers.
• When a new module is added to the existing functionality.
Sanity Testing
Sanity testing is a kind of testing performed to check whether a software product is working
correctly when a new module or functionality gets implemented to an existing product. Sanity
testing is a software testing technique which does a quick evaluation of the quality of the software
release to determine whether it is eligible for further rounds of testing or not.
Sanity testing is usually performed after receiving a fairly stable software build or sometimes
when a software build might have undergone minor changes in the code or functionality. It
decides if end to end testing of a software product shall be carried out further or not.
Sanity testing is also a Surface Level Testing which helps in deciding if the software build is
good enough to pass it to the next level of testing.
Why perform Sanity Testing
• To verify and validate the conformity of newly added functionalities and features in
existing code.
• To ensure that the introduced changes do not affect other existing functionalities of the
product.
• To decide further testing can be carried forward or not.
• Build is received after many regressions or if there is a minor change in the code.
• The build is received after bug fixing.
• Just before the deployment on production.
Regression Testing
Regression testing is the verification of “bug fixes or any changes in the requirement” and
making sure they are not affecting other functionalities of the application. Regression testing is
effective on automation and usually performed after some modifications have been made in the
software build after requirement changes or bug fixes.
Once Sanity testing of the changed functionality is completed, all the impacted features of the
application require complete testing. This is called regression testing.
Whenever bug fixes are done in the existing software, some test scenarios need to be
executed, to verify the bug fixes. In addition to these, the QA team also has to check the impacted
areas, based on the code changes. In regression testing, all those test scenarios will have to be
executed, to take care of related functionalities.
Experience-Based techniques
These techniques are highly dependent on tester’s experience to understand the most
important areas of the software. The outcomes of these techniques are based on the skills,
knowledge, and expertise of the people involved. The types of experience-based techniques
are as follows:
Error Guessing
In this technique, the testers anticipate errors based on their experience, availability
of data and their knowledge of product failure. Error guessing is dependent on the skills,
intuition, and experience of the testers.
Exploratory Testing
This technique is used to test the application without any formal documentation.
There is minimum time available for testing and maximum for test execution. In exploratory
testing, the test design and test execution are performed concurrently.
Test Strategy is a set of guidelines that explain the test design and determine how
testing needs to be done.
Example: A Test Strategy includes details like “Individual modules are to be tested by the test
team members”. In this case, who tests it does not matter – so it’s generic and the change in
the team member does not have to be updated, keeping it static.
The purpose of the test strategy is to define the testing approach, the types of tests,
test environments, and tools to be used for testing and the high-level details of how the test
strategy will be aligned with other processes. The test strategy document is intended to be a
living document and will be updated** when we get more clarity on Requirements, SLA
parameters, Test environment and Build management approach, etc.
Test strategy is intended for the complete project team that comprises of Project
Sponsors, Business SMEs, Application/ Integration Development, System Integration partners,
Data Conversion Teams, Build/Release Management Teams such as technical leads,
architecture leads, and deployment and infrastructure teams.
A Test Plan can be defined as a document that defines the scope, objective, and
approach to test the software application. The Test Plan is a term and a deliverable.
The Test Plan is a document that lists all the activities in a QA project, schedules them,
defines the scope of the project, roles & responsibilities, risks, entry & exit criteria, test
objective, and anything else that you can think of.
The Test Plan is as I like to call a ‘super document’ that lists everything there is to
know and need.
The Test Plan will be designed based on the requirements. While assigning work to
the test engineers, due to some reasons one of the testers gets replaced by another one. Here,
the Test Plan gets updated.
The Test strategy outlines the testing approach and everything else that surrounds it.
It is different from the Test Plan, in the sense that a Test strategy is only a subset of the test
plan. It is a hardcore test document that is to an extent generic and static. There is also an
argument about at what levels test strategy or plan is used- but I really do not see any
discerning difference.
Example: The Test Plan gives information about who is going to test at what time. For Example,
Module 1 is going to be tested by “X tester”. If tester Y replaces X for some reason, the test
plan has to be updated.
Test Plan is a document that provides complete information about testing tasks
related to a Software Project. It provides details like Scope of the testing, Types of testing,
Objectives, Test Methodology, Testing Effort, Risks & Contingencies, Release Criteria, Test
Deliverables, etc. It keeps track of possible tests that will be run on the system after coding.
The test plan is obviously set to change. Initially, a draft test plan will be developed
based on project clarity at that time. This initial plan will get modified as the project
progresses. Test team Manager or Test Lead can prepare the test plan document. It describes
the Specifications and is subject to change based on the same.
What to test, when to test, who will test, and how to test will be defined in the test
plan. Test Plan will sort out a list of issues, dependencies, and the underlying risks.
TestScenario
Example:
In simple terms, it is a technique to ensure that your tests are testing your code or how
much of your code you exercised by running the test.
• Test coverage can be done by exercising the static review techniques like peer
reviews, inspections, and walkthrough
• By transforming the ad-hoc defects into executable test cases
• At code level or unit test level, test coverage can be achieved by availing the
automated code coverage or unit test coverage tools
• Functional test coverage can be done with the help of proper test management
tools