Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Important Valeo Qs

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Question about Big Endian: how to put 12 34 56 78 in address

0xff000000
- 0xff0000 78 56 34 12
-0xff0000 12 34 56 78

#define Max-Num 100 used to:


-precompile ......
-Preprocessor .....(sa777)

* i=4 , j=7
X=j || i++ && 1;
What are the values of I,x? i=4 , x= ?
-

i=5
5
4
4

, x=1
7
1
7

*Typical CAN speed? //// fee e5teyarat Tanya bas dol 2a2rab 7agten wana
metla5bata benhom
- 50K 500K b/s
- 500K 5M b/s

X=2*3+4*5 ,, x= ?
o 26
o 50
o 125

EEPRM Interface (ana dawart 3la el net w la2et el egaba de : SPI, IC) w
dol mawgoden f el e5teyarat
Static variables are saved in :
o Data segments ??
o Stack
o Heap

local variables are saved in :


o Data segments
o Stack
o Heap
We want to save 0x65A in the physical address 0xAAF we will use
: ( anamsh mota2akeda mn el codes kanetmaktobakedabelzabt ,
bas heyashabaha :D)
o *(u8* const) 0x65A=0xAAF;
o *(u8* const) 0xAAF=0x65A;
o u8* p=(u8*) 0x65A; p=0xAAF;
o u8* p=(u8*) 0xAAF; p=0x65A;
we use .......... for variable definition to reach an optimized C code
for access variables:
o Extern
o Volatile
o Static
o Register
o E5teyar rabe3 , ta2reebn auto
When we use ..... for variable declaration , the compiler doesn't make any
optimization
o Extern
o Volatile
o Static
o Register
o E5teyar rabe3 , ta2reebn auto
CAN and LIN Differneces (Multi master aw single , multi slaves aw la2a)

CAN: multi masters


LIN: single master and multi slaves, half duplex

What
o
o
o

is the duty Cycle of waveform?


Period that the signal is active
Period of the waveform
Retio ben 7agten ma5adtesh balimenhom :D(Time of the on
signal /total time)
What is PWM parameters: (da te5tary mennokaza e5teyar)
o Amplitude and frequency
o Frecuency and Duty cycle
o Duty Cycle and Amplitude
o On time and off time
o E5teyar rabe3 mshfakrah (on w off + duty cycle)
What dose affect stack consuming for function? (momken te5tary
kaza 7aga)
o Number of static variables in this func
o Number of local variables in this func
o The length of function code

o Function argumenmts
o Number of calling function
Embedded development constraints: (choose more that one)
o Limited prower consumption
o Limited CPU pace
o Limited development budget
o Limited Memory resources
o Limited 7aga Tanya mshfakraha bas
kanfeehakelmetPower :D
Difference between Union and Structure (el e5telaf femeen beya5od
memory aktar w a3taqed en hwa el Union :D bas et2akedy ) union
Haygeblek code beta3 functinmaktob b taree2et el Macro w el function
7asallaha calling 5 marrat ,, el memory size beta3et el code da (ellihwa el
7al ya3ny :D) = 505??
Haygebleknafs el function maktoba bas mn 3er macro , b el tare2a el
3adeya ya3ny w bardo 7asallaha calling 5 maratbardo w el size f el 7ala
de =125 , hashra7lek leh on phone

#Pragma used for? (mshfakra el e5teyarat :D) allows various instructions


defined by the compilers creator to be given to the compiler(#pragma
name)>>if this name is unrecognized by the compiler, then the #pragma
is ignored and no error results.

............ define variable without reserve memory for it: (anagawebt be


Register)
o Extern
o Volatile
o Static
o Register
o E5teyar rabe3 , ta2reebn auto
#if and #endif are using for:
o Define Macros (de egabty) ??
o 7aga mshfakraha
o 7aga mshfakrahabardo :D
Difference between Flash memory w EEPROM
o Page of Flash is larger than page of EEPROM (de el egabaelli 2aletly
3aleha salma)
o Ba2y el e5teyarat mshfakraha
Making the variable static affects:
o Its scope
o Its lifetime
o Its scope and lifetime
o It depends
Can we pass structure to Function by value? y/n (w e3rafy leh yes
aw no 3shan momkenyegeblekkaza yes w kaza no )
Can we pass Array to function by value?

No,Arrayes are Pointers


Yes
No,Arrayescant passed argument (fekalam wa2e3 f el
gomlamshfakrah :D)
#define Max_Num 100 used to:
o Pre complie ...... (kelma wa23a meni :D)
o PreProcessor...... (nafs el kelma el wa23a meni :D)
o Ba2y el e5teyarat mshfakraha :D bas makanshfeeha 7aga ma3rofa
leya :D
Real Time systems requires deadline and:
o 7aga mshfakraha
o 7aga mshfakraha
o Guarantee finishing tasks at the deadline
o Guarantee finishing tasks before its deadline
What is the meaning of nested interrupt?
o Ability to server more than one interrupt
o Inability to server more than one interrupt
o Serving a new interrupt while another interrupt with lower priority
was serving
Tools that is used in connecting between functions (e5tary kaza 7aga )
o Semaphores
o Tasks
o Mutexes
o Critical systems
o Kanfekaza e5teyar tanyeenmshfakrahom bsra7a :D
The most suitable definition for interrupt controller is:
o A small microcontroller that handle the interrupts
o Small circuit that handle interrupts and define its priority
o Small circuit that enables and disables the interrupt
o B&C
Differences between SPI and UART (which is synchronour and which is
asynchronous, which is multi Masters which is single master, which is
multi slaves and which is single slaves)
o
o
o

SPI : Synchronous, single master, multi slaves, full duplex


UART: Asynchronous, single master, multi slaves, full duplex ??

UART
o Synchronous
o Asynchronous
o Asynchronous/Synchronous

USART
o Synchronous

o
o

Asynchronous
Asynchronous/Synchronous

The use of Watchdog timer in UART (mshfakra el e5teyarat bas


shofyhwa 2eh lazmeto)

UART Simulator can determine the time of small functions? (T/F)

Reentrant function
Ynf3 tf5olha w hya running
X=5
x=x ^ (1<<2) ,, //// ^ means XOR
LSB(Least Significant bit)= 0,
This line :
o
o
o
o

Set Bit 5 of x
Clear Bit 3 of x
Toggle bit 3 of x
Toggle bit 2 of x

Which of the next variable can be defined as volatile (el so2al da 7assa
ennokaza wa7da feehom yenfa3o sa7, bas hwa yasma7 be egaba wa7da
bas :D)
o Memory ...................Status register (el no2at de kalam wa2e3
menni :D)
o Global .......................
o Global variable that is used in multithreaded applications

5alli balekmn el pointers elligaya de ,, gat f el emte7an raqam (f) int


(*a)[10];
a) int a; // An integer
b) int *a; // A pointer to an integer
c) int **a; // A pointer to a pointer to an integer
d) int a[10]; // An array of 10 integers
e) int *a[10]; // An array of 10 pointers to integers
f) int (*a)[10]; // A pointer to an array of 10 integers
g) int (*a)(int); // A pointer to a function a that takes an integer
argument and returns an integer

h) int (*a[10])(int); // An array of 10 pointers to functions that


take an integer argument and return an integer

If these numbers are pushed into stack in order 1,2,3 and 5,, the first one
wil pop is?
o 5
o 3
o 2
o 1

i=5
if (i-- >= 4)
write Hello;
Writeend;
o Hello
o End
o Hello then end

Write the "standard" MIN macro-that is, a macro that takes two
arguments and returns the smaller of the two arguments.

#define MIN(A,B) ((A) < = (B) ? (A) : (B))lwgaly <= w < a5tar anhy ?
El so2al da gali b el 7arf keda bas kan choice tab3n

Using the #define statement, how would you declare a manifest


constant that returns the number of seconds in a year? Disregard leap
years in your answer.

o #define SECONDS_PER_YEAR (60 * 60 * 24 * 365)


o #define SECONDS_PER_YEAR (60 * 60 * 24 * 365UL)
o #define SECONDS_PER_YEAR (60 * 60 * 24 * 365);
o #define SECONDS_PER_YEAR 60 * 60 * 24 * 365
El 7al elli f el folder beta3 embedded C interview da mshmawgod few ala e5teyar
feehom :D, fa el egabayaema el 2ola yaema el Tanya :D es2ali 7ad mn el 3eyal
elihenak ba2a

i=1.5
Switch (i)
{Case 1 : cout<< 1;
Case 2 : cout<< 2;
Case 3 : cout<< 3;
Default: Cout<< 0;
}the results will be

o
o
o

1230
0
Compile Error

Input capture
o Capture I/O ports status
o Capture analoge signals
o Parameter based on timer, measure signals and speed

*wzeeft L Logic analyzer


Unit testing
Syntax
Int size
Type def.
Timer
Kol el testing eh ?
Srs

Difference between SIP and UART or UASRT.


Is the Array can be passed by reference?
Is the structure can be passed by reference?
*Array of pointers can be passed by value or by
reference?
Protocols used with EEPROM?
Page size of EEPROM and Flash? Which one is larger?

*Software Quality Assurance!


*Software Quality Control!
*Software Development Plan!
*What are the measurements of
Software?
*What is the role of Measurements team?
Where do we save Local varaiables?

You might also like