Coder Social home page Coder Social logo

donniethang / embedded-interview-questions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nhtranngoc/embedded-interview-questions

0.0 0.0 0.0 20 KB

A list of embedded interview questions, by Reddit user /u/Enlightenment777. I will attempt to go through all of these questions and answer them.

embedded-interview-questions's Introduction

embedded-interview-questions

  1. Which endianness is: A) x86 families. B) ARM families. C) internet protocols. D) other processors? One of these is kind of a trick question.

A) x86 CPUs, especially Intel, are little endian.

B) Most ARM processors are little endian, or bi-endian.

C) Networking protocols mainly are big endians.

  1. Explain how interrupts work. What are some things that you should never do in an interrupt function?

Interrupts are signals, or events that temporary suspend the main software code, and rather execute an external task. Interrupts are usually hardware-driven, though there are software interrupts, implemented in the instruction set.

Interrupts' big no nos:

  • Blocking function calls
  • Non-reeentrant function calls
  • Long function calls
  • Dynamic memory allocation (even more so in embedded)
  1. Explain when you should use "volatile" in C. volatile indicates the variable may be subject to change at any time. By using volatile, you tell the compiler to not optimize it.

Therefore it is best to use volatile for memory-mapped, or hardware interfacing variables, or variable set in one thread of an OS to signal another.

  1. Explain UART, SPI, I2C buses. Describe some of the signals in each. At a high-level describe each. Have you ever used any? Where? How? What type of test equipment would you want to use to debug these types of buses? Have you ever used test equipment to do it? Which?

  2. Explain how DMA works. What are some of the issues that you need to worry about when using DMA?

  3. Where does the interrupt table reside in the memory map for various processor families?

  4. In which direction does the stack grow in various processor families?

  5. Implement a Count Leading Zero (CLZ) bit algorithm, but don't use the assembler instruction. What optimizations to make it faster? What are some uses of CLZ?

  6. What is RISC-V? What is it's claimed pros or cons?

  7. List some ARM cores. For embedded use, which cores were most commonly used in the past? now?

  8. Explain processor pipelines, and the pro/cons of shorter or longer pipelines.

  9. Explain fixed-point math. How do you convert a number into a fixed-point, and back again? Have you ever written any C functions or algorithms that used fixed-point math? Why did you?

  10. What is a pull-up or pull-down resistor? When might you need to use them?

  11. What is "zero copy" or "zero buffer" concept?

  12. How do you determine if a memory address is aligned on a 4 byte boundary in C?

  13. What hardware debugging protocols are used to communicate with ARM microcontrollers?

JTAG and SWD.

  1. What processor architecture was the original Arduino based on?

The ATmega168 on the Arduino Duemilanove (?)

  1. What are the basic concepts of what happens before main() is called in C?

  2. What are the basic concepts of how printf() works? List and describe some of the special format characters? Show some simple C coding examples.

  3. Describe each of the following? SRAM, Pseudo-SRAM, DRAM, ROM, PROM, EPROM, EEPROM, MRAM, FRAM, ...

  4. Show how to declare a pointer to constant data in C. Show how to declare a function pointer in C.

const uint8_t foo = 20;
uint8_t * bar;
bar = &foo;
void (*foo) (int);
  1. How do you multiply without using multiply or divide instructions for a multiplier constant of 15, 30, 60, 260?

  2. When do you use memmove() instead of memcpy() in C? Describe why.

  3. Why is strlen() sometimes not considered "safe" in C? How to make it safer? What is the newer safer function name?

  4. When is the best time to malloc() large blocks of memory in embedded processors? Describe alternate approach if malloc() isn't available or desired to not use it, and describe some things you will need to do to ensure it safely works.

  5. Describe symbols on a schematic? What is a printed circuit board?

  6. Do you know how to use a logic probe? multimeter? oscilloscope? logic analyzer? function generator? spectrum analyzer? other test equipment? Describe when you might want to use each of these. Have you hooked up and used any of these?

  7. What processors or microcontrollers are considered 4-bit? 8-bit? 16-bit? 24-bit? 32-bit? Which have you used in each size group? Which is your favorite or hate?

  8. What is ohm's law?

V = I * R

  1. What is Nyquist frequency (rate)? When is this important?
  • Nyquist frequency is the highest possible frequency that can be accurately sampled based on the sampling rate. Any data sampled past the Nyquist frequency will come with aliasing, a type of digital distortion.
  1. What is "wait state"?

  2. What are some common logic voltages?

3.3v is most commonly used nowadays, followed by 5v and 1.8v.

  1. What are some common logic famlies?

  2. What is a CPLD? an FPGA? Describe why they might be used in an embedded system?

  3. List some types of connectors found on test equipment.

  4. What is AC? What is DC? Describe the voltage in the wall outlet? Describe the voltage in USB 1.x and 2.x cables?

  • Alternative Current and Direct Current. Alternative Current alternates between VCC and GND at a fixed frequency, usually 60Hz. Direct current does not.

  • In a wall outlet, the AC voltage is 220v (in European and Asian countries), and 110V (in US and Canada).

  • In USB 1.x and 2.x cables, DC voltage is 5v.

  1. What is RS232? RS432? RS485? MIDI? What do these have in common?
  • They are all serial communication protocols.
  • RS232 is full-duplex, RS432 is half-duplex. RS485 is differential transmission mode, while RS232 is single-ended transmission mode. MIDI is very similar to RS232, however MIDI has a baud rate of 31250 baud, while RS232 has many standard baud rates.
  1. What is ESD? Describe the purpose of "pink" ESD bags? black or silvery ESD bag? How do you properly use a ground strap? When should you use a ground strap? How critical is it to use ESD protections? How do you safely move ESD-sensitive boards between different parts of a building?

  2. What is "Lockout-Tagout"?

  • Lockout-Tagout is a safety protocol used to prevent tampering with machinery when not in use. The machinery in question has to be locked and tagged (with the name of the person who holds the key) when not in use.
  1. What is ISO9001? What is a simple summary of it's concepts?

  2. What is A/D? D/A? OpAmp? Comparator Other Components Here? Describe each. What/when might each be used?

  3. What host O/S have you used? List experience from most to least used.

  • Linux (Fedora, Ubuntu, Debian, Arch)

  • Windows

  • MacOS

  1. What embedded RTOS have you used? Have you ever written your own from scratch?

  2. Have you ever implemented from scratch any functions from the C Standard Library (that ships with most compilers)? Created your own because functions in C library didn't support something you needed? Most <string.h> functions, atoi, itoa, and other misc. functions in K&R's book.

  3. Have you ever used any encryption algorithms? Did you write your own from scratch or use a library (which one)? Describe which type of algorithms you used and in what situations you used them?

  4. What is a CRC algorithm? Why would you use it? What are some CRC algorithms? What issues do you need to worry about when using CRC algorithms that might cause problems? Have you ever written a CRC algorithm from scratch?

  5. Do you know how to solder? Have you ever soldered surface mount devices?

  6. How do you permanently archive source code? project? what should be archived? what should be documented? have you ever written any procedures of how to archive or build a project? How about describing how to install software tools and configuring them from scratch on a brand new computer that was pulled out of a box?

  7. What issues are a concern for algorithms that read/write data to DRAM instead of SRAM?

  8. What is the "escape sequence" for "Hayes Command Set"? Where was this used in the past? Where is it used today?

  9. What is the "escape character" for "Epson ESC/P"? Where is this used?

  10. After powerup, have you ever initialized a character display using C code? From scratch or library calls?

  11. Have you ever written a RAM test from scratch? What are some issues you need to test?

  12. Have you ever written code to initialize (configure) low-power self-refreshing DRAM memory after power up (independent of BIOS or other code that did it for the system)? It's likely that most people have never done this.

  13. Write code in C to "round up" any number to the next "power of 2", unless the number is already a power of 2. For example, 5 rounds up to 8, 42 rounds up to 64, 128 rounds to 128. When is this algorithm useful?

  14. What are two of the hardware protocols used to communicate with SD cards? Which will most likely work with more microcontrollers?

  15. What issues concerns software when you WRITE a value to EEPROM memory? FLASH memory?

  16. What is NOR-Flash and NAND-Flash memory? Are there any unique software concerns for either?

  17. Conceptually, what do you need to do after reconfiguring a digital PLL? What if the digital PLL sources the clock for your microcontroller (and other concerns)?

  18. What topics or categories of jokes shouldn't you discuss, tell, forward at work?

  • Jokes considered inappropriate or of discriminative nature.
  1. Have you ever used any power tools for woodworking or metalworking?

  2. What is a common expression said when cutting anything to a specific length? (old expression for woodworking)

Measure twice cut once.

  1. Have you ever 3D printed anything? Have you ever created a 3D model for anything? List one or more 3D file extensions.
  • .stl, .obj
  1. Do you know how to wire an AC wall outlet or ceiling light? Have you ever done either?

  2. Have you ever installed a new hard drive / RAM / CPU in a desktop computer?

  3. Have you ever installed Windows or Linux from scratch on a computer that has a brand-new hard drive?

  4. Have you ever "burned" a CD-R or DVD-R disc? Have you ever created an ISO image of a CD or DVD or USB drive or hard drive?

  5. Have you ever read the contents of a serial-EEPROM chip from a dead system (though EEPROM chip is ok)?

  6. Have you ever written data to a serial-EEPROM chip before it is soldered down to a PCB?

  7. How do you erase an "old school" EPROM chip? (has a glass window on top of the chip)

  • Erasing an EPROM is done by shining ultraviolet ray on the window - an alternative is to leave it out under direct sunlight for a bit.
  1. Describe any infrared protocols, either for data or remote controlling a TV.

  2. What is the most common protocol is used to communicate with a "smart card"? Have you ever written any software to communicate with a "smart card" in an embedded product?

  3. What is I2S? Where is it used? Why might you want to use I2S in an embedded system? Have you ever used it?

  4. What is CAN, LIN, FlexRay? Where are they used? Have you ever used any?

  5. What is ARINC 429? Where is it commonly used? Have you ever used it?

  6. What in-circuit debuggers or programmers have you used? Which one do you like or hate?

  7. Do you know any assembler code? For which processor? What assembler code is your favorite or hate? Have you ever written an assembler from scratch?

  8. What is "duff's device"? Have you ever used it?

  9. What is dual-port RAM? Why would it be useful in some embedded systems? What concerns do you need to worry about when using it? Have you ever used it? How?

  10. Have you ever soldered any electronic kits? Have you ever designed your own PCB(s)? Describe. What is a Gerber file?

  • A Gerber file is usually a collection of files with information on how a Printed Circuit Board should be manufactured, including routes, drill holes, silkscreen..
  1. If you create a circular buffer, what size of buffer might optimized code be slightly faster to execute? why?

  2. Describe how to multiply two 256-bit numbers using any 32-bit processor without FPU or special instructions. Two or more methods?

embedded-interview-questions's People

Contributors

nhtranngoc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.