Embedded Flashcards
What is a bootloader?
A program that runs before main application code. It initializes hardware, sets up memory, and loads application from storage into RAM
What’s the difference between C and Embedded C?
C is hardware independent and Embedded C is hardware dependent. A specific compiler is needed to compile embedded C for a specific uc.
What is a compiler? What does it output?
Compilers transform source code from a programming language a machine readable binary format
What is a watchdog timer?
A watchdog timer is a device that monitors uC programs to see if they are still operating. The WDT communicates with the uC at set interval. If the uC doesn’t output a signal or outputs too many signals the timer determines that the uC is malfunctioning. Windowed mode WDT detects both no signal and too many signals (which is a more robust fault checking method than Timed mode)
List various timers in embedded systems
WDT, General Purpose Timer, Interval Timer, SysTick Timer, RTC
What are pull-up and pull-down resistors? What are some considerations to take into account when sizing them?
Pullup/down resistors are used to ensure that a GPIO pin is not floating when it is not in use. High resistor values can cause slow rise-time in the GPIO pin (RC circuit with wire capacitance), too low resistors can allow current leaking and waste power
What is an ISR?
As ISR is an interrupt service routine. The procedures stored at a specific memory address are called when a specific interrupt occurs. ISRs return nothing and do not allow passing parameters.
Where are constant variables stored in memory?
data segment typically
What is the role of an Interrupt Vector Table in Interrupt Processing?
It contains the addresses of ISRs. Each entry corresponds to a specific interrupt and the address of the ISR in memory.
What’s the difference between a Process and a Thread?
Threads share address space and processes don’t. Processes are heavyweight and require significant overhead, threads are lightweight and don’t. Threads can communicate via shared variables, mutexes, semaphores, condition variables.
What are the 4 levels of testing in Embedded Systems?
Unit, Integration, System, Acceptance
Big vs Little Endian?
Big endian stores MSB at the smallest memory address. Little endian stores LSB at the largest memory address. Bit order internal to the bytes is not affected.
RS232 vs RS485?
Both serial. 232 is point-to-point over short distances. It uses a single data line. 485 is multipoint over longer distances and in noisy environments. It uses differential signaling.
What is a Semaphore? How is it different from a Mutex?
Mutex ensures only one thread can access a shared resource at a time. They are binary semphores. Semaphores have multiple states (represented by a counter) unlike mutexes which can be locked or unlocked. Semaphores can control access to a pool of resources or limit concurrent accesses.
Difference between Macro and Inline Fucntion?
Macros take more space (copy code wherever macro exists) but execute faster. They are expanded by preprocessor. Inline functions are slower but take up less space. Inline funcions have compile-time error checking unlike macros