0% found this document useful (0 votes)
59 views5 pages

EMBEDDED

This document contains 30 questions and answers related to embedded systems. It covers topics such as differences between embedded C and traditional C, macros vs inline functions, reentrant functions, virtual memory implementation, uses of microcontrollers, real-time embedded systems, interrupts, timers, loops, errors, semaphores, watchdogs, volatile keyword, communication buses, DMA, aerospace applications, FPGA, interrupt latency, 8051 architecture, and memory types like ROM, SRAM.

Uploaded by

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

EMBEDDED

This document contains 30 questions and answers related to embedded systems. It covers topics such as differences between embedded C and traditional C, macros vs inline functions, reentrant functions, virtual memory implementation, uses of microcontrollers, real-time embedded systems, interrupts, timers, loops, errors, semaphores, watchdogs, volatile keyword, communication buses, DMA, aerospace applications, FPGA, interrupt latency, 8051 architecture, and memory types like ROM, SRAM.

Uploaded by

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

Embedded System Interview Questions and Answer PDF

1. Differences between traditional C language and Embedded C

C Language Embedded C
Embedded C is used for embedded systems
C is mainly used for developing desktop
that have limited resources like ROM, RAM
applications
and more
It is of native development nature It is used for cross-development purposes

2. What are the differences between Macro and Inline Function?

Inline Function Macro Function


Inline functions follow strict data type Macro functions do not follow strict
checking of the parameters. parameter data type checking
Inline functions are expanded by the Macro functions are expanded by the
compiler. preprocessor at the compile time.

3. What is a reentrant function?

• A function is called reentrant if the function can be interrupted in the middle of the
execution and be safely called again (re-entered) to complete the execution.
• The interruption can be in the form of external events or signals or internal signals
like call or jump.
• The reentrant function resumes at the point where the execution was left off and
proceeds to completion.

4. What Is a Virtual Memory in Embedded C and how can it be implemented?

• Virtual memory is a means of allocating memory to the processes if there is a


shortage of physical memory by using an automatic allocation of storage.
• The main advantage of using virtual memory is that it is possible to have larger virtual
memory than physical memory.
• It can be implemented by using the technique of paging.

5. Why embedded system is useful?

• It is possible to replace dozens or even more of hardware logic gates, input buffers,
timing circuits, output drivers, etc. with a relatively cheap microprocessor.

6 .What is the difference between microprocessor and microcontroller?

Microprocessor Microcontroller
Microprocessor is managers of the resources
Microcontroller have I/O, memory, etc. built
(I/O, memory) which lie outside of its
into it and specifically designed for control
architecture

7.Explain what is microcontroller?


• Microcontroller is a self-contained system with peripherals, memory and a processor
that can be used as embedded system.

8. Is it recommended to use printf() inside ISR?

• printf() is a non-reentrant and thread-safe function which is why it is not


recommended to call inside the ISR.

9. Explain what are real-time embedded systems?

• Real-time embedded systems are computer systems that monitor, respond or control
an external environment.
• This environment is connected to the computer system through actuators, sensors, and
other input-output interfaces.

10. What is ISR (Interrupt Service Routines)?

• ISR expands to Interrupt Service Routines.


• These are the procedures stored at a particular memory location and are called when
certain interrupts occur.

11. List out various uses of timers in embedded system?

• Real Time Clock (RTC) for the system


• Initiating an event after a preset time delay
• Time slicing for various tasks
• Time division multiplexing
• Scheduling of various tasks in RTOS
• Initiating an even after a comparison of preset times
• Capturing the count value in timer on an event
• Between two events finding the time interval

12. What Is Concatenation Operator in Embedded C?

• The Concatenation operator is indicated by the usage of ##. It is used in macros to


perform concatenation of the arguments in the macro.
• We need to keep note that only the arguments are concatenated, not the values of
those arguments

13. What kind of loop is better - Count up from zero or Count Down to zero?

• Loops that involve count down to zero are better than count-up loops. This is because
the compiler can optimize the comparison to zero at the time of loop termination.
• The processors need not have to load both the loop variable and the maximum value
for comparison due to the optimization. Hence, count down to 0 loops are always
better

14. List out some of the commonly found errors in Embedded Systems?

• Due to garbage or errors some memory locations being inaccessible in storage


• Inappropriate insertion of memory devices into the memory slots
• Wrong control signals
• Damage of memory devices static discharges and transient current
• Address line malfunctioning due to a short in circuit
• Data lines malfunctioning

15. What is the difference between semaphores and mutexes?

Semaphores Mutexes
A semaphore can be signaled from any other Mutex can only be released by thread which
thread or process. had acquired it
While for semaphore you won’t know which
Mutex will always have a known owner
thread we are blocking on

16. Explain what is semaphore?

• A semaphore is an abstract datatype or variable that is used for controlling access, by


multiple processes to a common resource in a concurrent system such as
multiprogramming operating system.

17. Explain what is the need for an infinite loop in embedded systems?

• Embedded systems require infinite loops for repeatedly processing or monitoring the
state of the program.
• For instance, the case of a program state continuously being verified for any
exceptional errors that might just happen during run-time such as memory outage or
divide by zero, etc.

18. Explain what is a Watchdog Timer?

• Watchdog timer is an electronic device or electronic card that execute specific


operation after certain time period if something goes wrong with an electronic system.

19. What are the differences between the const and volatile qualifiers in embedded C?

Const Volatile
The keyword const is enforced by the The keyword volatile tells the compiler to not
compiler and tells it that no changes can be perform any optimization on the variables and
made to the value of that object/variable not to assume anything about the variables
during program execution against which it is declared.

20. Why do we use the volatile keyword?

• The Volatile keyword is mainly used for preventing a compiler from optimizing a
variable that might change its behavior unexpectedly post the optimization.
• To inform the compiler, we use the keyword volatile at the time of variable
declaration.

21.What are buses used for communication in embedded system?


• I2C: It is used for communication between multiple ICs
• CAN: It is used in automobiles with centrally controlled network

22. What does DMA address will deal with?

• DMA address deals with physical addresses.


• It is a device which directly drives the data and address bus during data transfer.
• It is purely physical address.

23. Mention the embedded systems used in aerospace?

• Control systems for aircraft


• Automated
• In-flight embedded system for passengers
• Controls for engines

24. Explain the Full form of FPGA ?

• The FPGA full form is Field-programmable gate arrays

25. What is interrupt latency?

• Interrupt latency is a time taken to return from the interrupt service routine post
handling a specific interrupt.

26. What are some real-time applications of embedded processors?

• Cell phones
• TV
• Medications
• Passenger vehicles
• The Dishwasher

27. What is the maximum oscillator frequency and peak performance of the 8051?

• An 8051’s oscillator frequency could reach 12 MHz and its peak performance was 1
MIPS.

27. Define the Mask read-only memory.

• Mask programming is also known as factory-programmed ROM, and it is not cheap.


• Memory read-only masks operate at 1.5 times the speed of DRAM.

29. Define Hexadecimal.

• In embedded systems, it is widely used.


• Using this system, large binary numbers can be represented compactly.
• Numbers in hexadecimal are signified by the prefix ‘0X’ in C (and elsewhere).

30. Define the SRAM


• Information is stored using an electronic flip flop as a read-write memory.
• Circuits are more complex, but no refreshing is required. It may take one-third as long
as DRAM to access data.

You might also like