Interview Questions
Interview Questions
0 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.
7. What is arbitration :
12. What are events in capl : on start, on key, on sysvar, on envvar, on message, on timer
14. Write capl for sending a periodic message for every 100/50/10 msec
Variables
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);
State transition,
0 to 1, 1 to 0, 1 to 2, 3 to 4
Equivalent partition:
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
10 01 | 50 01 00 0A 00 64, 7f 10 78; 7f 10 10
27 01 | 67 01 xx xx xx xx
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
Window:
Up, down: by driver i.e driver control (all windows, driver window)
Down,: ,, ,, ,,
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.
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.
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.
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);
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.
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.
How to config / init / start PWM on S32R372 ? Could anyone provide the sample code ?
ArkAndyFraser
12-27-2023 10:29 AM
In your steps above you say "change the Dio Port Id to 3." Why 3? What does 3 mean ?!
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
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.
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.
IdentifierServices DID, Data Element, RDBI, WDBI, DDDI services, Map 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.
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:
1. ID value: 0xF189
2. one Data Element with base type Unsigned
3. Services:
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.
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:
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:
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.
The one already generated from ConfigureDIDswindow can be seen by clicking on the Service
Table and then on the Diagnostic Connection button
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.
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
Can2Can signal gateway through COM - RTA Knowledge Base - RTA Hotline Confluence (etas.com)
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)
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.
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.
To learn how to set up an AUTOSAR platform with the lights control example, see AUTOSAR
Platform.