Embedded Software Engineering Interview Questions & Answers

Sdílet
Vložit
  • čas přidán 15. 06. 2024
  • Embedded C Programming for Absolute Beginners: bit.ly/3RYbR0U
    Master Embedded Driver Development: bit.ly/3vd6YqJ
    Master DMA’s: bit.ly/3vcE8Xy
    Master RTOS: bit.ly/3zuU7Tp
    Want to Support This Channel? Use the "THANKS" button to donate :)
    Hey all! Today I'm sharing my top 10 interview questions! Hope you enjoy them!
    Add me on Instagram: / greitzz
    This video is NOT sponsored. Some product links are affiliate links which means if you buy something I will receive a small commission.
    Camera used for recording content: amzn.to/3kEdccY
    ▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬
    0:00​ - Intro
    0:20 - Disclaimers
    1:09​ - 1. Explain how the SPI works
    2:02 - 2. How does a DMA work?
    2:50 - 3. What is a Semaphore? How Is it different from Mutex?
    3:29 - 4. How to collect data in parallel and in sync?
    4:18 - 5. When and why to use keyword volatile?
    5:04 - 6. What are some ways to minimize MCU power consumption?
    6:36 - 7. What are the benefits of RTOS?
    7:20 - 8. Should we always use an RTOS?
    8:04 - 9. What to remember when writing an ISR?
    8:36 - 10. What are Little and Big Endian?
    9:09 - BONUS Question. What are Pull-up and Pull-Down Resistors?
    Errata: “Direct Memory Access” instead of “Dynamic Memory Access” - DMA
  • Věda a technologie

Komentáře • 107

  • @GreidiAjalik
    @GreidiAjalik  Před 2 lety +10

    Feel free to leave your embedded software engineering interview questions in the comments below! Cheers!

  • @vasanth0x55tube
    @vasanth0x55tube Před 2 lety +75

    Some of the questions that immediately came to my mind are
    1) What is a race condition? What causes it and how to avoid it?
    2) What happens in a startup code?
    3) How does a cpu handle an interrupt?
    4) what is an interrupt latency? How can it be measured?
    5) What is a software interrupt?
    6) what is the difference between a breakpoint and watchpoint?
    7) What is meant by board bringup activity?
    8) Explain a scenario where you have used a logic analyzer

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +7

      Great questions! thanks for sharing!

    • @vamsikrishna9825
      @vamsikrishna9825 Před rokem +12

      2) startup code runs bootloader first then checks for the any new firmware for the flash memory. If not bootloader switches to the starting address of the flash memory, where our previously loaded firmware starts excecuting. From then cpu loads address of the each instrcution to the stack pointer. Goes everything normal.
      3) Whenever the interrupt triggers, the processors stops the execution and hands over the process to interrupt handler(ISR). The cpu loads the address of the ISR in the Stack pointer. Once the execution of the ISR over. SP intializes with the memory address where it was resumed before.
      5) software interrupts are created by the system whenver the exceptions happend.
      6) when u are debugging the code breakpoints are helpful to break the execution at required line of code. Where as watchpoint is u can add it to the debug window to see how the variable is changing over time in the process.
      Any thing wrong i answered feel free to correct me.
      Thank you.

    • @tanujkumar7983
      @tanujkumar7983 Před rokem +8

      @@vamsikrishna9825 MCU executes instructions pointed by Program Counter (PC) and not the stack pointer (SP). SP is used to store the return address so that MCU can use it to reinitialise PC in order to resume last process execution after an interrupt or exception.

    • @evic262
      @evic262 Před rokem +3

      @@tanujkumar7983 return address from a subroutine is kept in link register (LR), SP keeps the pointer to active stack.

    • @tanujkumar7983
      @tanujkumar7983 Před rokem +1

      @@evic262 that's true in case of ARM. But thanks, actually I am currently working on EFM8 so completely forgot about ARM for a while. Thanks again

  • @djdarco
    @djdarco Před 2 lety +29

    Wow, these are some really low-level questions and you really provide great information! As an interviewer I'm much more interested in the person sitting accross me. Such as teamwork, the ability to learn new things, communication skills and so on. Technical skills and abilities are mostly already pointed out in the CV, but the non-technical skills.
    I think it is also good to add that if you don't have an answer it is okay to be honest about it, not everyone knows everything and again the ability to learn is also very important.

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +4

      +1!!! I can’t agree more with this!!! Thanks for bringing this up Dirk!

  • @randomyoutubeuser8509
    @randomyoutubeuser8509 Před rokem +2

    I have seen all of these question in the interview. good video!

  • @panagiotisfelekis7105
    @panagiotisfelekis7105 Před 2 lety +1

    Great Video Greidi! Just started looking for my next Embedded Software job. Great Timing

  • @hawwoth
    @hawwoth Před 2 lety +1

    Thank you! These questions are really helpful! Keep it going. You're great! :D

  • @TuchoJL
    @TuchoJL Před 2 lety +5

    I really appreciate these videos. I am about to finish my degree and I want to make a career in embedded systems. Videos like this are very helpful to get an idea of ​​what I am going to face. It would be great if you continued making videos about embedded systems. Thank you!!

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +1

      You’re welcome! Thanks for the support!!

  • @nanisaladi4710
    @nanisaladi4710 Před 2 lety +11

    Thanks a lot for Awesome content 😊 keep going…
    Some Interesting Questions:
    1. multi core programming and debug
    2. IoT and Embedded
    3. Power management, clocks
    4. role of OSI in newer communications like pcie, all wireless, usb, thunderbolt etc
    5. Bus
    6. Memory management, caching
    7. s/w topics like - preprocessors, understanding coredumps, struct vs union
    8. LLDB
    Looking fwd for more videos 👍🏻

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +1

      Thank you for the support and sharing the questions!

  • @aishwaryashashikumar3645
    @aishwaryashashikumar3645 Před 2 lety +3

    Hey Greidi! I'm so glad you're back with making videos regularly!
    I remember you were studying at Georgia Tech part time and I'll be going there this fall for master's in ECE
    Let me know where I can get in touch with you, have a lot to discuss :)

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety

      Thank you for the support!! People can always reach out to me on discord/instagram :)

  • @CaliforniaSunboy
    @CaliforniaSunboy Před rokem

    For the bonus question about pull-up/down-resistors I would also explain, why I need them, especially because i don't want floating (undefined, random) readings on an input pin. I you have an unconnected pin when the button is not pressed, the input is likely to be random (not really, but hard to predict)

  • @thisaintmyrealname1
    @thisaintmyrealname1 Před 2 lety +2

    Thanks for the content! And please keep featuring your dog in the background 🥲

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety

      Thank you for your support!! I’ll try to make sure he gets more camera time… lol

  • @MrDajiangyoude
    @MrDajiangyoude Před 4 měsíci

    I am indebted to this video.

  • @noahbraasch7854
    @noahbraasch7854 Před rokem +1

    As a computer engineering student, its great knowing some of these questions! Still have lots to learn though... haha

  • @sivapraveens9643
    @sivapraveens9643 Před 2 lety +1

    Good information, thanks a lot💙. Love from India

  • @emmanuelkorankye1154
    @emmanuelkorankye1154 Před 2 lety +3

    Great video mate; it's difficult finding embedded systems content on CZcams. I would also like to ask if you have any books you recommend for beginners in embedded systems.

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety

      Thank you for the support! Unfortunately I don't have any right now ... it's a common question I get and I'm working on getting a solid list of books together that are actually good...

  • @SpaceSurferGod
    @SpaceSurferGod Před 2 lety +41

    Some questions I answered during an interview I gave recently (Embedded + OOP):
    1. How do you prevent memory leaks?
    2. How do you use stack?
    3. When do you want to use static classes?
    4. What is polymorphism and inheritance?
    5. Major difference between C and Python.
    6. Have you used pointers as parameters to functions?
    7. How have you used interrupts in your code before?
    8. How have you used watchdogtimer in your code?
    9. How do you use pointers?
    10. How do you use private constructors?
    These mostly cover what I was asked, it is not strictly an embedded role but embedded plus general software developer role. Hopefully I'll get in!

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +4

      Rahul! Thank you so much for sharing this info! Lots of good questions that can help a lot of people when they prepare for their interviews!

    • @bagaspermana88
      @bagaspermana88 Před rokem +3

      those are hard questions :(

    • @AlonsoNoCarDude
      @AlonsoNoCarDude Před rokem +2

      Hopefully you get an offer from them. Thanks for sharing.

    • @lemon6521
      @lemon6521 Před rokem +2

      These questions are kinda crazy.
      Major difference between C and Python? They're polar opposites, how much time does the interviewer have?!
      How do you use pointers? Have you used pointers as parameters in functions? This basically amounts to "have you ever touched code"

    • @miloszivkovic6256
      @miloszivkovic6256 Před rokem +3

      I will give my answers and give an * next to an answer I think is incomplete / wrong
      1. Use smart pointers instead of raw pointers, but embedded is resource constrained and sometimes raw pointers are absolutely necessary *
      2. Not sure if Stack/Heap memory management or stack data structure (they are the same) *
      2.a. Stack is a linear data structure that uses LIFO (last in first out) model. Stacks are used for many things like backtracking and expression evaluation. Stack defines three operations: push (creates a new item on top of the stack), pop (removes and returns top item of the stack) and peek (just reads the top item without removing it)
      2.b. Most famous use of a stack is memory management in modern languages. Stack is used to track references and primitive values, as programs execution enters a scope a new item is created on a stack that allocates memory for that scope, when program execution exits the scope stack is popped and memory is freed.
      3. I have no idea what this is about. Static inner classes in Java come to mind ****
      3.a. When do you want to use static variables in classes? Static in classes defines memory that is shared by all instances of that class, there are two use cases: static methods and static variables. Static methods are added to class namespace, limitation of static methods is that they cannot access instance varables. use cases are factory and utility methods. static variables hold data that is global to the class it is often used to store class constants.
      4. I am not gonna dignify this with a response
      5. C is a statically typed (instead of duck typed), compiled (instead of interpreted), python has automatic memory management (GC), python is portable, C can natively use threads etc.
      6. No, I am a normal person that has a life. I primarly use Java that doesn't expose pointers to programmers but it does use pointers below the hub, every time I pass something by reference I use pointers. ***
      7. I have never programmed embedded systems but I know what interrupts are. Interrupts are a mechanism that allows microcontroller to interupt current execution and respond to an event, this improves responsivnes of embedded systems. Without interrupts we would have to pool external dependencies
      8. *** (I know what it is but that's not the question)
      9. Pointers allow us to allocate large chunks of memory once and pass a pointer to that memory instead of copying it. ***
      10. Private constructors restrict creation of objects outside of the class, most common use of private constructors is in singleton pattern, factory pattern, utility classes and to prevent subclassing

  • @krishna_raj
    @krishna_raj Před 2 lety +1

    You are one of a kind make more and from everything

  • @kaushalpanchalk.p4930

    Great video,
    How can we select a clock ? Of course it depends on the requirement say for example I have only bare metal code there is no rtos and there are only few peripherals like uart, i2c and spi and it works on standard frequency.
    So can we identify this much clock is enough for this project?

  • @user-ky6jx5jm3c
    @user-ky6jx5jm3c Před 6 měsíci

    great! I was asked some basic questions like how much memory does unsigned char or short data type occupy? Explain what heap memory is? Next week I have another Technical interview with a big company. I will share their questions here .

  • @evic262
    @evic262 Před rokem +3

    Great video! Just a little comment on cpu clock freq. on power consumption; in some cases you actually need max clock freq to achieve lower power consumption. (e.g. serve all the tasks and do all the calculations as fast as possible and go back to sleep).

    • @GreidiAjalik
      @GreidiAjalik  Před rokem +1

      Thanks for the support! That's true, there can be some corner cases like that :) thanks for clarifying.

    • @mandar_dessai
      @mandar_dessai Před 9 měsíci

      Race to halt :)

  • @shivas2714
    @shivas2714 Před 2 lety +5

    Love from India 💯
    I just now started as a Embedded C Engineer..... keep doing more videos for us

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +1

      Thanks for the support! Cheers! :)

    • @shivas2714
      @shivas2714 Před 2 lety +1

      Thanks

    • @barath3956
      @barath3956 Před 2 lety

      Hello, shivs s I am goind to learn Embedded could you please provide me your email id or phone number so I can contact you?

    • @Brave569
      @Brave569 Před 10 měsíci

      English communication is compulsory for that field?

    • @rahulkumarmahato4357
      @rahulkumarmahato4357 Před měsícem

      Bro give me some suggestions I want to start this career in embedded system

  • @darshanpandya6111
    @darshanpandya6111 Před rokem +2

    Dog behind you is so cute 🥰 !!
    Thanks for informative video.

  • @bhaveshnaik1337
    @bhaveshnaik1337 Před 4 měsíci +1

    The Dog is enjoying his life

  • @Error__504
    @Error__504 Před rokem +1

    How the locking procedure of mutex take place

  • @pedrovelazquez138
    @pedrovelazquez138 Před rokem +2

    Im from Paraguay. I am finishing my degree in Electronics Engineering and Im surprised by the ammount of questions that I can answer in this video.
    The thing with the career itself here is that there are not many jobs available for us locally. I tried applying online but I got rejected many times. Can you give some advice?

  • @kayakMike1000
    @kayakMike1000 Před 4 měsíci

    Low power mode... Make sure you do the WFI instruction

  • @voytek_two_thousand
    @voytek_two_thousand Před 2 lety +20

    DMA = Direct Memory Access (not Dynamic)

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +8

      Absolutely correct! I have this errata listed in the description of the video already :) thanks for adding it to comments as well!

    • @voytek_two_thousand
      @voytek_two_thousand Před 2 lety

      @@GreidiAjalik my bad, should have looked harder

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +1

      You’re all good! I’m glad it’s in the comments as well - easier to find/see!! Cheers!

    • @BenMorse0
      @BenMorse0 Před 6 měsíci

      Came here to leave this comment

  • @zeelpatel1002
    @zeelpatel1002 Před rokem

    Network communication protocols?

  • @ramprasanthudhayabaskar8073

    Isn't DMA, Direct Memory Access? I only heard it that way and not Dynamic Memory Access as told in the video. Or is this another name?

    • @GreidiAjalik
      @GreidiAjalik  Před rokem

      it is, it was a mistake on my part, it has already been pointed out in the comments and there is Errata in the video description. Cheers! :)

  • @dishakarnataki7019
    @dishakarnataki7019 Před 2 lety +2

    Why use bare metal programing when we have compiler to write a startup code and dump code in microC

    • @vamsikrishna9825
      @vamsikrishna9825 Před rokem

      Ans: bare metal code enables direct manuplating the registers to get the required output. Whwere as startup code includes uncessary data some times which u dint required for your project, which increses the size your program. When u are more specific with the program memory u should opt to bare metal. And bare metal some what speed as u are directly manuplating the registers.

  • @vincentlow4172
    @vincentlow4172 Před rokem +2

    I like how emo your dog is. =D

  • @zltn_brkl
    @zltn_brkl Před 2 lety +1

    Hey Greidi
    I just wanted to say thank you for this valuable video, I am a self taught electrical and embedded software engineer and I would like to ask what kind of project do you recommend doing and putting to my portfolio.
    Thank you in advance

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +1

      Thanks for the support!!! What projects do you already have there? any specific industry you are targeting? (i.e. automotive, wearables, robotics...)

    • @zltn_brkl
      @zltn_brkl Před 2 lety

      @@GreidiAjalik I am mainly on IoT. Especially smart home/systems/automation

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety

      I’ll give my best shot here, but I think anything with facial recognition would be a huge +. At home camera monitoring system or something like that. Building the hardware + software and a phone/pc app for it would be a pretty significant effort and good experience. Thoughts?

    • @zltn_brkl
      @zltn_brkl Před 2 lety

      @@GreidiAjalik sounds great, to be honest I have already experienced with facial recognition, the main idea was something like a smart home security/entrance system. Thanks for your advice and your support as well.

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +1

      Also, audio processing stuff is good too… could be voice activation of device, gunshot detection - very low power oriented iot stuff…

  • @dhanushronaldo5378
    @dhanushronaldo5378 Před 2 lety +1

    I need to check the interview rounds of top companies like Qualcomm, Rockwell and Honeywell for embedded software engineer. So, where can I find it?

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety

      You can have some luck with leetcode forums or reddit. Take a look there :)

  • @PALTUBABY
    @PALTUBABY Před rokem

    Very nice explanation. I would like to add 1 point for mutex and sem. In addition to what you explained, the difference in mutex and sem is in their usage. Mutex is used for mutual exclusion and sem is used for synchronization between tasks or tasks and ISRs

  • @infantmano2977
    @infantmano2977 Před rokem

    Explain CAN buss brother

  • @kayakMike1000
    @kayakMike1000 Před 4 měsíci

    Its not an illusion. Processes spend most of their time waiting for IO, so switching among tasks is a good idea.

  • @eyalporat3027
    @eyalporat3027 Před rokem +1

    9/10 :)

    • @GreidiAjalik
      @GreidiAjalik  Před rokem +1

      That's pretty good .... lol, thanks for the rating! :)

  • @TonyDaExpert
    @TonyDaExpert Před 2 lety +1

    I am only on my first Embedded systems class so I am wondering is DMA a RTOS concept?

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +1

      DMA (Direct memory access) is not an RTOS concept. It’s feature/device part of the microcontroller.

    • @ohwow2074
      @ohwow2074 Před 2 lety +2

      DMA exists everywhere. Even on $300 laptops up to $5000 PC and even super computers and smart phones. It's funny but without DMA the world of computing would be far less efficient.

  • @bobwmcgrath
    @bobwmcgrath Před rokem

    How many years of experience do you need before they don't ask you stuff like that? I feel like I used to be able to ace all those questions, but now I'm more focused on my very specific parts of my project and I don't worry about some of that stuff.

    • @GreidiAjalik
      @GreidiAjalik  Před rokem +1

      Depends on the job, most companies still will ask some of these questions no matter what years of experience you have.

  • @barath3956
    @barath3956 Před 2 lety

    Hi buddy, I have a question does IoT Engineers use SQL for Analyzing Data?

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety +2

      If there are databases involved, then maybe, otherwise, I don’t think so…

    • @barath3956
      @barath3956 Před 2 lety

      @@GreidiAjalik Why I asked is IoT engineers collect lot of data so how they will analyze the data?

    • @GreidiAjalik
      @GreidiAjalik  Před 2 lety

      missed your follow up questions.... Sometimes you do need to analyze data in real time so you analyze some data on the devices directly or partial analyzation and rest is done later within database structure. Otherwise whatever the developers/company decide to use for data analysis is up to them... it could be SQL if the existing infrastructure is there or could be NoSQL or some other fun way of doing it, maybe pandas df?

    • @Foersom_
      @Foersom_ Před rokem

      It would depend on the size (RAM and CPU) of the IOT device. Many MCU are much too small, you would read data and store in a memory structure / records format. Then send those data by serial or other communication to a PC or larger device that can process and store data maybe in SQL DB.

  • @buddysnackit1758
    @buddysnackit1758 Před rokem +2

    They ask about what is on the data sheet? It takes like 1/2 hour to read that and understand it. Why would ANYONE memorize this.

  • @msbanda2123
    @msbanda2123 Před 2 lety +1

    👍

  • @kayakMike1000
    @kayakMike1000 Před 4 měsíci

    Errr... Pulling data in parallel.... Gotta make sure your DMAs are able to work on the bus at the same time...

  • @chadizdroid
    @chadizdroid Před rokem +1

    You need to provide correct and clear info.. what is miso or mosi.. DMA is Direct Memory Access ..

    • @GreidiAjalik
      @GreidiAjalik  Před rokem +1

      Good to know! Thanks for the feedback! :)

  • @haebrahimi
    @haebrahimi Před rokem +1

    DMA = Direct Memory Access

  • @keyurpanchal1706
    @keyurpanchal1706 Před 2 lety

    in DMA, actually CPU is not in ideal mode and also CPU does not give all controls to the DMA controller.

  • @buddysnackit1758
    @buddysnackit1758 Před rokem

    DMA ...noty Dynamic but Direct

  • @mitchellbergman7482
    @mitchellbergman7482 Před 2 lety +3

    I was recently asked:
    How does free() know how much memory to free?
    #define SQR(a) (a*a)
    SQR(10) returns 100
    But
    SQR(2+8) returns 26
    Why? And how do you debug that?
    Give me some examples of where you’d use an open/close collector/emitter.
    As a state machine: How would you prevent an actuator or bearings from seizing up under extreme temperatures provided expensive and sensitive TECs?

  • @thehouseofelamrani5795
    @thehouseofelamrani5795 Před 9 měsíci +1

    the questions in th video :
    1. Explain how the spi works.
    2. How does a DMA work?
    3. What is Semaphore ? How is it different from Mutex ?
    4. How to collect data in parallel and in sync ?
    5. When and why to use keyword volatile ?
    6. What are some ways to minimize MCU power consumption ?
    7. What are the benefits of RTOS ?
    8. Should we always use RTOS ?
    9. What to remember when writing an ISR ?
    10. What are little and big Endian ?
    11. What are pull-up and pull-down Resistors ?

  • @theodoreomtzigt7145
    @theodoreomtzigt7145 Před rokem +2

    DMA = Direct Memory Access, not Dynamic Memory Access

  • @gkpar
    @gkpar Před 4 měsíci

    You dog could care less about embedded questions...he was just waiting for you to take him out for a nice walk.....

  • @dimabirenbaum9200
    @dimabirenbaum9200 Před 11 měsíci

    2:06 DMA is not a "Dynamic" Memory Access. It is a Direct Memory Access - a technique that allows devices to *directly* access system memory without CPU intervention, as it sounds. Typically controlled and configured through hardware registers and DMA controllers.
    Dynamic Memory Access (if there is such a definition) - refers to the dynamic allocation and management of memory during program execution, such as managing the process's heap (memory allocations using malloc()), etc.
    Direct Memory Access focuses on data transfer, and Dynamic Memory Access focuses on memory allocation.