This article tries to list the commonly used embedded software interview questions asked to entry level and middle level job openings. This article will be updated with new questions as and when available.
- How an ISR is getting invoked during an interrupt trigger.
- Write a program in C to reverse bits in a 32-bit unsigned word.
- Implement modulo operator using bit-wise operators in C.
- Given an unsigned 32-bit word, an addition/subtraction field, the number to perform the addition or subtraction with respect to the addition/subtraction field and bit-mask with consecutive set-bits in the given bit-mask width. Need to write a C program to perform the addition/subtraction within only the given range as per the bit-mask. The computation should not modify the bits out side the bit-mask range on the number. Also, to make sure that an overflow condition should set all the bits in the bit-mask range and if the result of the computation underflow then the bits in the bit-mask region to be cleared.
- How does mutex works in RTOS.
- Implement Mutex_Lock() and Mutex_Unlock() in C.
- Explain CAN protocol from a software implementation perspective.
- Why is structure padding used in C. What would happen if there is no structure padding on a 32-bit machine.
- What are the operating modes in ARM Cortex M processors.
- Write a C program to swap the rows-to-columns for any square matrix.
- Write C program to implement queue data structure.
- Which is a lightweight interface; Mutex or binary semaphore.
- Why we use volatile keyword in embedded firmware. Explain the program execution behavior with respect to memory access with the volatile variable.
- How do you write a read-only register access variable in C given a hex number as the register address. Also, explain how can we access individual bytes as well as the entire 32-bit register in C efficiently.
- What would happen if one member of a structure is made static.