0% found this document useful (0 votes)
104 views38 pages

Interview Questions

Uploaded by

Suresh Namburi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views38 pages

Interview Questions

Uploaded by

Suresh Namburi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 38

The Python AUTOSAR package — AUTOSAR 0.4.

0 documentation

Hercules Safety MCU Resource Guide — Hercules Safety MCUs Documentation

HOWTO: Create a Blinking LED example project using S32K1xx RTD with AUTOSAR - NXP Community

Very important questions and which will cover 70% to 80% of the interviews.

1.Tell me about your self

2. Explain about your project

3. Draw bench setup / hil

4. Explain current project / BCM

5. Explain can protocol I.e speed, dataframe explain,

6. Errors in can protocol , ACK, CRC, FORM, BIT, STUFF

7. What is arbitration :

8. What is bit stuffing :

9. Why we will connect 120ohms resistance :

10. Windows in CANoe :

11. Difference between CANoe and CANAlyzer

12. What are events in capl : on start, on key, on sysvar, on envvar, on message, on timer

13. Functions in capl : output, settimer, canceltimer, write, putvalue, getvalue

14. Write capl for sending a periodic message for every 100/50/10 msec

Variables

message bcmframe1 b1;

mstimer t1;

timer t2;

On start

{
b1.signal=1;

output(b1);

settimer(t1,2);

on timer t1

b1.signal=1;

output(b1);

settimer(t1,2);

15. Send 0 to 100 values in speed signal using capl

16. explain flow control

8bytes of 10bytes of data

17. Write flow control in capl

17. Flashing sequence

18. What is v&v explain

19. What are the different test techniques

State transition,

0 to 1, 1 to 0, 1 to 2, 3 to 4

Equivalent partition:

Odometer value 0 to 100000 : 25000, 50000, 75000


Boundary value analysis: Odometer value 0 to 100000

-1 0 1 99999 100000 100001

20. Which tool you are using for bug tracking and Explain buglife cycle

20. Different types of tastings : Regression, sanity, smoke, unit, white box vs black box, functional vs
nonfunctional, retest

21. Explain diagnostic services with positive response

10 01 | 50 01 00 0A 00 64, 7f 10 78; 7f 10 10

27 01 | 67 01 xx xx xx xx

27 02 xx xx xx xx | 67 02 00 00 00 00; 7f 27 35; 7f 27 36; 7f 27 24

19 01 FF| 59 01 FF 02

19 02 FF | 59 02 FF C1 40 00 FF C1 40 01 FF

3E 00/ 3E 80

22 f1 86 | 62 f1 86 01

22. Explain NRCs : 10, 11, 12, 13, 33, 35, 36, 78, 22, 31, 24

23. Explain security access, tester present

23. What is can server max and can*server max

24. Explain 78, 33,35,36,13,24,7f nrcs

Window:

Up, down: by driver i.e driver control (all windows, driver window)

Up, down: by individual passengers


Up: ign off, acc, crank, run, Vol: h, l

Down,: ,, ,, ,,

Wiper motor: low, m, high

This document shows the step-by-step process to create a simple 'Blinking_LED' application
using the S32K1xx RTD and the S32 Configuration Tools. This example is for the
S32K144EVB-Q100 EVB, connected to a PC through USB (OpenSDA) connection.

Preparation
1. Setup the software tools
a. Install S32 Design Studio for S32 Platform
b. Install the S32K1xx development package and the S32K1 RTD AUTOSAR 4.4. Both
of these are required for the S32 Configuration Tools.

2. Launch S32 Design Studio for S32 Platform

Procedure
1. New S32DS Project

OR

2. Provide a name for the project, for example 'Blinking_LED_RTD_AUTOSAR'. The name must
be entered with no space characters.

3. Expand Family S32K1xx, Select S32K144

4. Under Toolchain, select NXP GCC 9.2


5. Click Next

6. Click '…' button next to SDKs


7. Check box next to PlatformSDK_S32K1_2022_02_S32K144_M4F. Click OK

8. Click Finish. Wait for project generation wizard to complete, then expand the project within the
Project Explorer view to show the contents.
9. To control the LED on the board, some configuration needs to be performed within the Pins
Tool. There are several ways to do this. One simple way by double-click on the MEX file.

10. By default, the Pins tool is then presented. Since the AUTOSAR drivers will be used, click the
switch to disable this tool from the Overview tab.
11. Once the Pins tool is disabled, the Config Tools Overview menu appears. Select the Peripherals
tool.

12. After the Peripherals tool opens, look to the Components tab. By default, new projects are
created with the osif and Port_Ip drivers. Leave the osif driver, but remove the Port_Ip driver.
This will be replaced by AUTOSAR version. Right-click on the Port_Ip box and select
Remove.
13. Add the AUTOSAR version of the Port driver. Click on the ‘+’ next to the MCAL box. This
will bring up a list of AUTOSAR components.

14. Locate then select ‘Port’ and click OK. Do not worry about the warning message. It is only
indicating that the driver is not already part of the current project. The associated driver
package will be added automatically.

15. There are a couple of other drivers needed. Click the ‘+’ next to MCAL again and this time
select ‘Dio’. Once more, click the ‘+’ and select ‘Mcu’.
16. Select the ‘Dio’ component. Now select the DioConfig tab. Under DioPort_0, change the Dio
Port Id to 3. Click ‘+’ next to DioChannel to add a channel.

17. Select the ‘Port’ component. Now select the PortConfigSet tabl.

a. Under PortPin, change the setting for PortPin_0, PortPin Pcr from 0 to 96.

b. Then change the setting PortPin Direction from PORT_PIN_IN to PORT_PIN_OUT.

c. Change the setting PortPin Level Value from PORT_PIN_LEVEL_HIGH to


PORT_PIN_LEVEL_LOW.
d. Under UnTouchedPortPin, click ‘+’ and add the following 5 PortPin Pcr numbers: 4, 5,
10, 68, 69

18. Now select the PortGeneral tab, uncheck ‘Port Ci Port Ip Development Error Detect’.
19. Now the device configurations are complete and the RTD configuration code can be generated.
Click ‘Update Code’ from the menu bar.

20. To control the output pin which was just configured, some application code will need to be
written. Return to the ‘C/C++’ perspective.

21. If not already open, in the project window click the ‘>’ next to the ‘src’ folder to show the
contents, then double click ‘main.c’ file to open it. This is where the application code will be
added.
22. Before anything else is done, initialize the mcu driver, the clock tree, and apply PLL as system
clock. Insert the following line into main, after the comment 'Write your code here':
Mcu_Init(&Mcu_Config_BOARD_InitPeripherals);
Mcu_InitClock(McuClockSettingConfig_0);
while ( MCU_PLL_LOCKED != Mcu_GetPllStatus() )
{
/* Busy wait until the System PLL is locked */
}
Mcu_DistributePllClock();
Mcu_SetMode(McuModeSettingConf_0);

23. Before the pin can be controlled, it needs to be initialized using the configuration information
that was generated from the S32 Configuration tools. Initialize all pins using the Port driver by
adding the following line:
Port_Init(NULL_PTR);

24. Turn the pin on and off with some delays in-between to cause the LED to blink. Make the
delays long enough to be perceptible. Within the provided for loop, add the following lines:
Dio_WriteChannel(DioConf_DioChannel_DioChannel_0, STD_HIGH);
TestDelay(2000000);
Dio_WriteChannel(DioConf_DioChannel_DioChannel_0, STD_LOW);
TestDelay(2000000);

25. Before the 'main' function, add a delay function as follows:


voidTestDelay(uint32 delay);
voidTestDelay(uint32 delay)
{
staticvolatile uint32 DelayTimer = 0;
while(DelayTimer<delay)
{
DelayTimer++;
}
DelayTimer=0;
}

26. Update the includes lines at the top of the main.c file to include the headers for the drivers used
in the application:
Remove
#include "Mcal.h"
Add
#include "Mcu.h"
#include "Port.h"
#include "Dio.h"
27. Build 'Blinking_LED_RTD_AUTOSAR'. Select the project name in 'C/C++ Projects' view and
then press 'Build'.

28. After the build completes, check that there are no errors.

29. Open Debug Configurations and select 'Blinking_LED_RTD_AUTOSAR_Debug_FLASH'.


Make sure to select the configuration which matches the build type performed, otherwise it may
report an error if the build output doesn’t exist.
30. Confirm the EVB is connected to the PC via USB cable, then check the Debugger tab settings
and ensure that 'OpenSDA Embedded Debug - USB Port' is selected for interface.

31. Click Debug

32. To see the LED blink, click ‘Resume'

1 Kudo
Was this article helpful? YES NO

COMMENTS

Kidd
10-03-2023 03:10 AM
I would like to use PWM (FlexPWM0 submoudle3 A3 & X3 2channel )function to control 2
LEDs via TI Dual-Channel Smart High-Side Power Switch.

Use the internal clock.

Can switch the duty cycle. (25% / 50%)

How to config / init / start PWM on S32R372 ? Could anyone provide the sample code ?

ArkAndyFraser
12-27-2023 10:29 AM

This is an insane way to toggle a port pin !!!

In your steps above you say "change the Dio Port Id to 3." Why 3? What does 3 mean ?!

What is the significance of 96? in "PortPin Pcr from 0 to 96".

Why do this "and add the following 5 PortPin Pcr numbers: 4, 5, 10, 68, 69" ?

This seems much more complicated than the just setting the pins in the pins page and using the
SDK!

Andy

Introduction to NXP AUTOSAR MCAL Software | NXP Semiconductors

How to configure DCM UDS with the DEXT Editor


 Introduction
o Scope
o Definitions and Abbreviations
o Toolchain
o Prerequisites
 DEXT Editor container view
 Workflow
o Step 1. Contribution Set and Service Table creation
o Step 2. Identifier Services Workflow
 Configure DIDs window
 Configure Identifier Services - RDBI, WDBI
o Step 3. General Workflow
 Configure Session/Security Levels
 Configure Access Permissions
 Service Table - Diagnostic Connection configuration
 Service Class - UDS services configuration
o Step 4. UDS Window - UDS services configuration
o Step 5. Control Services - Sessions and Security Level configuration
o Step 6. ConfGen

Introduction
The Diagnostic Extract is a standardized AUTOSAR exchange format on diagnostic functionality
(DCM, DEM and FIM), formalized as an ARXML file.

During an ECU development project, three main roles (OEM, Application Developer and ECU
Integrator) exchange Diagnostic Extract files.

Therefore, the Diagnostic Extract format is based on the Diagnostic Extract Template (DEXT) that
allows gradual enrichment of definitions by the different roles.

Further, it supports the automatic code generation process for diagnostic modules.

Scope
In this guide we will explain how to create a Diagnostic Extract file with a UDS configuration
through the DEXT Editor of ISOLAR-AB.

Definitions and Abbreviations


BSW: AUTOSAR Basic Software, Hardware independent service layer

DCM: Diagnostic Communication Manager

DDDI: Dynamically Define Data Identifier

DEM: Diagnostic Event Manager

DEXT: Diagnostic Extract Template

DID: Diagnostic Identifier

DTC: Diagnostic Trouble Codes

FIM: Function Inhibition Manager


IOC: Input Output Control

OS: AUTOSAR Operating System

RTE: AUTOSAR Run-Time Environment

RDBI: Read Data By Identifier

UDS: Unified Diagnostic Services

WDBI: Write Data By Identifier

Toolchain
It is assumed you are using the RTA-CAR 9.2.0 toolchain:
RTA-CAR 9.2.0 toolchain

ISOLAR-AB v 9.2.0

RTA-RTE v 7.5.0

RTA-BSW v 6.1.2

RTA-OS v 6.2.0

However, the workflow should be applicable also with previous versions of the toolchain.

Prerequisites
In order to successfully follow this guide, you must have the RTA-CAR toolchain installed, and you
must be familiar with the AUTOSAR specifications, terminology and methodology.

DEXT Editor container view


The DEXT Editor has a lot of different windows visible on the container view present on the left of
the editor.
Some parameters have to be configured from more than one view so, to help the understanding of
the editor, here there is a summary of what can be configured from which view:
Window Parameters that can be configured

General or Sessions, security levels, environmental condition, access


AccessPermission permission

ServiceTable Diagnostic connection

ServiceClass UDS services creation

UDS UDS services configuration

IdentifierServices DID, Data Element, RDBI, WDBI, DDDI services, Map services

ControlServices IOC, ComControl, EcuReset, SecurityAccess services, Sessions, map


R/WDBI

DTCServices DTC services

Workflow
To configure correctly the UDS from the DEXT Editor a specific workflow has to be follow:
1. Create a ContributionSet and a ServiceTable
2. Create a Data Identifier (that will generate DID, DataElements and UDS Services)

Is very important that the second step of the workflow will be the creation of a Data Identifier
because through this command not only a DID will be created, it will also generate automatically
DataElements and UDS Services.

Step 1. Contribution Set and Service Table creation


If a diagnostic configuration is not present on your project yet you can simply create one opening
the DEXT editor.

To do so right click on the project name and click on Open with > DEXT Editor

After this step a window will open asking for the names of Contribution Set and Service Table that
can be set as shown in this image:

N.B.: Unfortunately the Service Table name can be only set during this step and not changed
anymore through the DEXT Editor. Anyway, it can be changed manually in the ARXML file if needed.
Step 2. Identifier Services Workflow
Configure DIDs window

The Configure DIDs window is the first step of the workflow shown opening the DEXT Editor and
also the first that has to be configured:

The DIDs, Data Element, UDS Services, Sessions, Security Levels and Access Permission can and
should be created from this window.

The first step is the creation of a DID clicking on the command Create Data Identifier:

Inside the Create Data Identifier window can be configured:

1. ID Values: Identifier of DID


2. Data Elements: Data belong to the DID
3. UDS Services: clicking on Preferences all the possible UDS services and subservices can
be selected
4. Access Permission: allow the selection of sessions and security levels
In this example we have configured only one DID with:

1. ID value: 0xF189
2. one Data Element with base type Unsigned
3. Services:

After this step different parameter will be configured:

 Data Identifier
 Data Element
 Security Level
 Sessions
 UDS services

Now, let see the other parameters that can be configured from the Configure DIDs windows other
than the command Create Data Identifier.
Clicking on the Contribution Set column of the DID created in the step before to see also its
Data Element on the table under it and configure all the parameters present in here as needed.

In this example you can configure:

 Data Identifiers Short Name: DspDid_ASW_VER_F189


 Data Identifiers Size: 64
 Data Element Bit Offset: 0
 Data Element Max Number Of Elements: 8

Configure Identifier Services - RDBI, WDBI

Moving on the second step of the workflow, the Configure Identifier Services, the RDBI and
WDBI services are already present because they are added during the creation of a DID if selected,
the first step of this guide.

Form here the default access permission of the DID can be configured or, you can create new AP
configuration following this step ConfigureAccessPermissions and then connect them to the RDBI
or WDBI form this view.
In this example the configuration is:

The Access Permission AP_Comb_002 is created under this step ConfigureAccessPermissions.

Step 3. General Workflow


The General Workflow can be open clicking on General from the Diagnostic Services window and
it allows to configure:

 Sessions
 Security Levels
 Environmental Conditions
 Access Permission
Configure Session/Security Levels

From this window the Security Levels and Sessions created during ConfigureDIDswindow are
visible and can be changed if needed.

New Security Levels and Sessions can also be added clicking on Create
SecurityLevels and Create Sessions or the one created from the first step can be modified
changing the parameters that are present in these two tables:

Configure Access Permissions

Moving on in the workflow, on Configure Access Permissions window, the Access Permission
created during ConfigureDIDswindow are visible and can be changed if needed.

New AP can be added clicking on Create Access Permission or the one that are already present
can be changed double clicking on the parameters that wants to be changed.

Service Table - Diagnostic Connection configuration

All the services added through ConfigureDIDswindow or ServiceClass-


UDSservicesconfiguration can be seen in a table from the Service Table window but, no-one of
them can be modified from here.
The Service Table window can be use to add or modify a Diagnostic Connection.

The one already generated from ConfigureDIDswindow can be seen by clicking on the Service
Table and then on the Diagnostic Connection button

Service Class - UDS services configuration

The Service Class window can be open clicking on the ServiceClass button under General.

The name of the UDS services created during ConfigureDIDswindow can be seen and changed
moving on the different windows that will appears clicking on the Show button, number two on
the image below, and double clicking on the ShortName of the service that you want to change.
Step 4. UDS Window - UDS services configuration
The UDS Window can be open clicking on UDS from the Diagnostic Services window and it allows
to see and configure all the services name and access permission that are created
during ConfigureDIDswindow.

Step 5. Control Services - Sessions and Security Level configuration


The Control Service window can be open clicking on the ControlService button under General.

The Security levels and Sessions created during ConfigureDIDswindow can be seen and changed
or add from the table SecurityAccessServices and SessionControlServices.
Step 6. ConfGen
All the parameters configured through the DEXT Editor can be added to the ECU
configuration clicking on ConfGen

After this step the Dcm configuration is visible on the


file ApplicationECU_Project_Dcm_EcucValues.arxml from the BSW Editor of the DCM module.
RTA Knowledge Base - RTA Knowledge Base - RTA Hotline Confluence (etas.com)

Can2Can signal gateway through COM - RTA Knowledge Base - RTA Hotline Confluence (etas.com)

Communication Services (ComStack) In AUTOSAR | by Rahul Priyadarshi | Medium

OS Learning for AUTOSAR Stack - RTA Knowledge Base - RTA Hotline Confluence (etas.com)

Introduction to AUTOSAR Classic NVRAM - RTA Knowledge Base - RTA Hotline Confluence (etas.com)
How to Configure the Watchdog BSW Stack's Supervision - RTA Knowledge Base - RTA Hotline
Confluence (etas.com)

(99+) Automotive Embedded Systems Handbook | Stanley Li - Academia.edu

Working with EB tresos Studio – Elektrobit

35 Top Autosar Interview Questions & Answers: Interview Tips in 2024 - ResumeKraft

"Part 1- Unlocking the Power of AUTOSAR: Understanding Components, Ports, and Port Interfaces in
Automotive Software" - DEV Community

Part 2-Understanding and Configuring Runnable Entities in AUTOSAR Software - DEV Community

AUTOSAR
TPT supports the testing of AUTOSAR components by integrating AUTOSAR software
components -that is atomic components and composition components- in the TPT virtual
machine.

This example demonstrates how to connect TPT to a simple AUTOSAR model (composition
component). It is a slightly modified lights control example.
AUTOSAR platform

First, create a new AUTOSAR platform in the platform configuration dialog (Ctrl+F10). The
AUTOSAR platform contains the AUTOSAR code generator which will create the code to
connect your AUTOSAR code with TPT.

In the Project Settings select the Project root folder of your AUTOSAR project and the folder
where the TPT generated code should be created (TPT output directory).

Next, all AUTOSAR-xml files in your AUTOSAR project folder are shown. You can use check
boxes to select which files should be included.

After importing the AUTOSAR model, you need to decide which component of the model you
wish to test. TPT supports the test of the entire project, composition components or atomic
components. Select the component from the SWC under test drop-down list.

If you created a mapping in TPT, you can select it from the Mapping drop-down list.
Click Import Interface to start the import the signal information from the ARXML file.

If you decided which part of the AUTOSAR model you wish to test, then TPT needs to know in
which order the concerned runnables should be executed. Go to the Runnables tab and apply
an order.
Runnable scheduling

The next step is to select the source files and libraries in your AUTOSAR project which will be
included into your AUTOSAR test frame.

Settings for C code wrapper

Finally click on "generate and compile" on the main Page of the AUTOSAR platform. Now TPT
has generated all the required wrapper code and compiled it together with the selected files.
The result is an executable test frame.

For more information, see AUTOSAR - SWC Code.

To learn how to set up an AUTOSAR platform with the lights control example, see AUTOSAR
Platform.

You might also like