Linux Kernel Drivers

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is a primary design intention behind the Linux kernel's approach to hardware?

  • Requiring all hardware interactions to occur via system calls.
  • Restricting hardware access to only a few privileged processes.
  • Exposing hardware devices directly to user-space applications for maximum performance.
  • Abstracting hardware access through a filesystem-like interface. (correct)

In embedded Linux systems, how are device drivers commonly integrated into the kernel?

  • They are loaded from user space at boot time.
  • They are dynamically activated and may be build-time parameterized in the kernel configuration. (correct)
  • They are installed as separate packages after the operating system is running.
  • They are always compiled directly into the kernel image, ensuring minimal overhead.

What is the role of a device tree in embedded Linux systems?

  • It provides parameters for existing device drivers to use the hardware correctly. (correct)
  • It specifies which drivers should be loaded at boot time.
  • It dynamically loads drivers to abstract the hardware.
  • It is a filesystem that stores device driver binaries.

Why might a customer benefit from having a driver for a custom peripheral included in the Linux kernel?

<p>It simplifies integration and broadens compatibility with embedded systems. (B)</p> Signup and view all the answers

In a SoC-FPGA based product, where a Linux distribution runs on the CPU part, how is product-specific hardware implemented in the FPGA part typically accessed?

<p>Through memory-mapped interfaces controlled by custom kernel drivers. (D)</p> Signup and view all the answers

In the context of the hierarchical architecture of device drivers within the Linux kernel, what happens if device A needs to be accessed through device B?

<p>The driver of device A utilizes the driver of device B directly. (D)</p> Signup and view all the answers

Within the Linux kernel, how do device drivers typically interact with each other?

<p>They directly access each other's functions. (B)</p> Signup and view all the answers

In the example of file access, what sequence of function calls does the kernel initiate when a user application reads a file?

<p>Filesystem (ext4) → storage (SSD block device) → storage controller (SATA) → hardware (B)</p> Signup and view all the answers

When accessing a storage device directly from user-space (e.g., /dev/sda), what is bypassed?

<p>Partitions and file systems. (B)</p> Signup and view all the answers

In the temperature sensor example, how does the kernel expose the value of a temperature sensor to a user application?

<p>Through a file in a virtual filesystem. (D)</p> Signup and view all the answers

Which of the following is the correct sequence of driver function calls when a user application reads a temperature sensor value in the kernel?

<p>hwmon device class → temperature sensor driver → I2C controller. (D)</p> Signup and view all the answers

What characterizes a 'block device' in the context of storage devices?

<p>Any write operation affects the entire block containing the byte. (D)</p> Signup and view all the answers

What is the purpose of a partition table on a storage device?

<p>To define the boundaries of partitions on the device. (B)</p> Signup and view all the answers

What is the maximum storage capacity that devices using MBR partition tables can handle?

<p>2 TiB (B)</p> Signup and view all the answers

Besides MBR, what is another common partition table format?

<p>GPT. (C)</p> Signup and view all the answers

What does a filesystem provide?

<p>A method to organize data in a tree-like hierarchical structure. (B)</p> Signup and view all the answers

Which characteristic is NOT a key difference between filesystem types?

<p>Drive manufacturer. (A)</p> Signup and view all the answers

What is the purpose of virtual filesystems?

<p>To expose kernel information and functionality to user-space applications. (D)</p> Signup and view all the answers

What is the role of the Root Filesystem (RootFS) in a Linux System?

<p>It is the filesystem of the main partition of a Linux system. (D)</p> Signup and view all the answers

Which of the following directories is NOT typically found in the RootFS?

<p>/tmp (A)</p> Signup and view all the answers

If a kernel runs, what allows its drivers to interpret data on a partition as a filesystem?

<p>The ability to interpret data as a filesystem, and interact with it accordingly. (D)</p> Signup and view all the answers

Where are filesystems on external partitions usually mounted?

<p>Subdirectories of <code>/mnt</code> or <code>/media.</code> (A)</p> Signup and view all the answers

What is a loop device used for?

<p>Mapping a binary file to a block device driver. (A)</p> Signup and view all the answers

What is an initial RAM filesystem (initramfs)?

<p>A preinitialized filesystem in RAM used as the RootFS. (B)</p> Signup and view all the answers

What program instructs the kernel to switch from the initramfs to the real RootFS?

<p>switch_root. (B)</p> Signup and view all the answers

What is a key difference between chroot and switch_root?

<p><code>chroot</code> changes the root directory of a single userspace process, while <code>switch_root</code> is used by the kernel replaces current rootfs (D)</p> Signup and view all the answers

What are loadable kernel modules (LKMs)?

<p>Kernel drivers that can be loaded and unloaded into the kernel at runtime. (D)</p> Signup and view all the answers

Where are loadable kernel modules typically stored in the RootFS?

<p><code>/lib/modules/&lt;kernel version&gt;/</code> (B)</p> Signup and view all the answers

How are drivers that can be compiled as modules indicated in their Kconfig file?

<p>Via a tristate option. (A)</p> Signup and view all the answers

What is the meaning of the '<M>' value when configuring a kernel driver?

<p>Compile this driver as a loadable kernel module. (D)</p> Signup and view all the answers

Which file is typically associated with specifying the build rules for a kernel driver?

<p>Makefile. (C)</p> Signup and view all the answers

What directory is the location of device tree bindings inside the kernel source tree?

<p><code>include/dt-bindings/</code> (A)</p> Signup and view all the answers

What is an out-of-tree kernel module?

<p>A module compiled without integrating it into the kernel source tree. (B)</p> Signup and view all the answers

If developing an out-of-tree module, what must match those used for the kernel build?

<p>The kernel headers and compiler options. (C)</p> Signup and view all the answers

Which memory region would contain instructions defining the driver's behavior?

<p>.text (D)</p> Signup and view all the answers

What does the .heap section in a kernel driver contain?

<p>Variables allocated separately for each device, used for communication and device state tracking. (B)</p> Signup and view all the answers

Through which interface can drivers offer files influencing their behavior (e.g., changing the direction of a GPIO pin)?

<p>SysFS (mounted on /sys) (A)</p> Signup and view all the answers

Which of the following is a characteristic of character devices?

<p>Allow reading and/or writing a linear stream of bytes, suitable for serial communication. (A)</p> Signup and view all the answers

In non-preemptive multitasking, what is a primary drawback of tasks waiting for hardware transactions or events?

<p>The CPU is occupied doing nothing useful and is unavailable for other tasks. (A)</p> Signup and view all the answers

What is the main advantage of a task 'yielding' the CPU in cooperative multitasking?

<p>It enables other tasks to execute while the current task is waiting, improving system responsiveness. (B)</p> Signup and view all the answers

What is a primary disadvantage of directly implementing cooperative multitasking in a super-loop?

<p>Tasks may wait longer than necessary because a task only continues after all other tasks have been executed. (C)</p> Signup and view all the answers

What is a key advantage of using an RTOS for preemptive multitasking?

<p>It simplifies the implementation of concurrent tasks. (B)</p> Signup and view all the answers

How does an RTOS handle a task that is waiting for a resource that is currently locked?

<p>The task is moved to the 'blocked' state and later to the 'ready' state when the resource is released. (D)</p> Signup and view all the answers

What happens in an RTOS when a higher-priority task becomes ready while a lower-priority task is running?

<p>The lower-priority task pauses, and the higher-priority task begins to run. (A)</p> Signup and view all the answers

Using RTOS scheduling strategies, what is the primary characteristic of the 'Earliest deadline first' (EDF) strategy?

<p>Tasks are executed in order of increasing deadline, until they complete or voluntarily leave the running state. (C)</p> Signup and view all the answers

In a cooperative multitasking system, how can the 'alarm' task, exemplified by runBuzzerTask(), be modified to operate more efficiently without blocking other tasks?

<p>By yielding the CPU to other tasks after switching the signal on or off and storing the task's state. (D)</p> Signup and view all the answers

For complex systems requiring memory management and high-speed peripherals, which type of processor is most suitable?

<p>An application-level processor with a memory management unit (MMU), such as ARM Cortex-A or x86. (B)</p> Signup and view all the answers

What is a major benefit of using GNU/Linux in embedded systems?

<p>It offers a wide range of management and debugging tools. (C)</p> Signup and view all the answers

Which process is initiated first by the Linux kernel, responsible for starting all other processes?

<p>The <code>init</code> process. (D)</p> Signup and view all the answers

How do user space processes typically access hardware in a Linux system?

<p>They use functions provided by the kernel, known as system calls. (A)</p> Signup and view all the answers

What is the role of device files in a Linux system concerning hardware access?

<p>To provide an interface to the user space through file system operations for managing devices. (D)</p> Signup and view all the answers

What is the purpose of Kconfig in the Linux kernel?

<p>To define and manage kernel configuration options. (A)</p> Signup and view all the answers

What is the function of the .config file in the Linux kernel build process?

<p>It stores the configuration tool's output, which is used during kernel compilation. (C)</p> Signup and view all the answers

In the context of a Linux Board Support Package (BSP), what is the role of the bootloader?

<p>To load the kernel from storage into memory and start it. (B)</p> Signup and view all the answers

Why is a device tree used in embedded Linux systems?

<p>To tell the kernel how to access hardware on the platform, such as memory-mapped peripherals. (C)</p> Signup and view all the answers

Before being used by the kernel, in which format is the device tree compiled?

<p>A binary <code>.dtb</code> (device tree blob) file. (A)</p> Signup and view all the answers

What is the primary reason for using a custom-built Linux distribution in embedded systems?

<p>To tailor the system to the specific needs of the application. (C)</p> Signup and view all the answers

What are the key functions performed by a build system that automates the Linux distribution build process?

<p>Downloads source code, configures, compiles, and installs packages into a RootFS. (C)</p> Signup and view all the answers

What is the role of system calls in Linux?

<p>They enable user-space processes to request services from the kernel. (C)</p> Signup and view all the answers

In preemptive multitasking with an RTOS, what is the term for saving the current state of an interrupted task and restoring it when the task is resumed?

<p>Context switch. (C)</p> Signup and view all the answers

What is the purpose of the dtoverlay command in Linux?

<p>It applies a device tree overlay at runtime. (B)</p> Signup and view all the answers

What is a primary difference between the init system in an embedded Linux distribution compared to a desktop distribution?

<p>Embedded init systems must be lightweight and optimized for resource constraints. (B)</p> Signup and view all the answers

What kind of files need to be part of a Linux distribution?

<p>The distribution needs to contain at least the C library, a shell, and an init system. (D)</p> Signup and view all the answers

What is the main function of the MMU (Memory Management Unit) in a system running Linux?

<p>The MMU ensures that peripherals can only be accessed via program code located in the kernel space of the memory. (A)</p> Signup and view all the answers

What is true about shared resources in the context of an RTOS?

<p>Shared resources should be protected by synchronization mechanisms, such as mutexes or semaphores. (A)</p> Signup and view all the answers

What is a characteristic of the bootloader on an embedded Linux system?

<p>It is usually only installed once - during device production (B)</p> Signup and view all the answers

Which of the following is most associated with the Yocto Project?

<p>A build system for embedded Linux distributions. (D)</p> Signup and view all the answers

In non-preemptive multitasking, which condition causes a running task to relinquish control of the CPU?

<p>The task voluntarily yields control or completes its execution. (C)</p> Signup and view all the answers

What component, typically included in a Board Support Package (BSP), provides the essential information about the hardware configuration of an embedded system for the Linux kernel?

<p>The device tree file. (B)</p> Signup and view all the answers

How do preemptive and non-preemptive multitasking differ in their approach to task switching?

<p>Preemptive multitasking allows a scheduler to interrupt tasks based on priority or time slice, while non-preemptive multitasking requires tasks to voluntarily relinquish control. (A)</p> Signup and view all the answers

Why might an embedded system developer choose to implement cooperative multitasking, despite its limitations?

<p>For simpler systems with few lengthy, non-time-critical tasks, as the programming model can be more straightforward. (C)</p> Signup and view all the answers

Which of the following is a potential drawback of using an MMU (Memory Management Unit) in an Embedded Linux system?

<p>Increased complexity in system design and debugging. (D)</p> Signup and view all the answers

Which advantage does a device tree offer in embedded Linux systems?

<p>The kernel can dynamically determine specific hardware without recompilation (D)</p> Signup and view all the answers

How does the use of device files in Linux contribute to the system's overall security?

<p>It allows hardware access to be managed. (C)</p> Signup and view all the answers

What component is commonly used to configure and build the Linux kernel in embedded systems, allowing for the selection of specific features and drivers to be included in the final kernel image?

<p>Kconfig (Kernel Configuration) (C)</p> Signup and view all the answers

What is the role of metadata in the Yocto Project, and how is it organized?

<p>Metadata consists of recipe files organized in layers, describing packages to be included in the distribution. (B)</p> Signup and view all the answers

What purpose does the construction and utilization of device tree files (.dts) serve in embedded Linux?

<p>Describing the hardware components. (A)</p> Signup and view all the answers

What is the primary function of memory in a computing system?

<p>To store information for later access by a processing unit. (D)</p> Signup and view all the answers

What does the L-bit number of a memory address allow?

<p>Access to $2^L$ words of M bits each. (A)</p> Signup and view all the answers

In memory organization, what does splitting the address into row and column addresses facilitate?

<p>Enables efficient read/write of word bursts. (A)</p> Signup and view all the answers

Which memory type is generally the most expensive per kilobyte?

<p>CPU Registers. (A)</p> Signup and view all the answers

Which memory type is typically the most affordable and offers the largest capacity?

<p>Magnetic, optical, removable (HDD, DVD, SD). (B)</p> Signup and view all the answers

Which of these memory types is considered volatile?

<p>DRAM. (A)</p> Signup and view all the answers

What is a key characteristic of Static RAM (SRAM)?

<p>It uses flip-flops to store data. (C)</p> Signup and view all the answers

Why is SRAM generally faster than DRAM?

<p>Because it is based on flip-flops rather than capacitors. (B)</p> Signup and view all the answers

Which is a primary application for SRAM?

<p>CPU caches and registers. (B)</p> Signup and view all the answers

What is a primary characteristic of DRAM (Dynamic RAM)?

<p>Requirement for periodic refreshing. (A)</p> Signup and view all the answers

Why is DRAM cheaper than SRAM?

<p>It uses fewer components per bit. (A)</p> Signup and view all the answers

What does DDR (Double Data Rate) SDRAM do?

<p>Transfers two data words per clock cycle. (A)</p> Signup and view all the answers

What is a key feature of LPDDR (Low Power DDR) SDRAM?

<p>Designed for mobile devices to conserve power. (B)</p> Signup and view all the answers

What is a typical drawback of using LPDDR-SDRAM?

<p>Limited or absent upgradeability due to soldering on the PCB. (C)</p> Signup and view all the answers

How does a CPU cache improve performance?

<p>By storing frequently accessed data for faster access. (A)</p> Signup and view all the answers

What happens in a 'cache miss'?

<p>The requested data is not found in the cache. (C)</p> Signup and view all the answers

What is the main difference between 'write-through' and 'write-back' cache policies?

<p>Write-through writes data to both cache and main memory, while write-back only writes to cache initially. (C)</p> Signup and view all the answers

What is the role of a memory controller (MC)?

<p>To handle the command/address protocol for external memory. (C)</p> Signup and view all the answers

In the context of semiconductor storage (e.g., flash memory), what is a Floating-Gate MOSFET (FGMOS)?

<p>A transistor that stores charge to represent data. (A)</p> Signup and view all the answers

How is data read from a floating-gate MOSFET (FGMOS) transistor in semiconductor storage?

<p>By applying a lower voltage and measuring the current flow. (D)</p> Signup and view all the answers

What is the significance of Multi-Level Cell (MLC) technology in flash memory?

<p>It enables the storage of multiple bits of data per cell. (B)</p> Signup and view all the answers

In flash memory, what does the term 'erase' refer to?

<p>Discharging the floating gate to reset the cell's state. (C)</p> Signup and view all the answers

What is a key difference between NOR flash and NAND flash memory?

<p>NOR flash allows easier single-bit reads, while NAND flash prefers block reads. (D)</p> Signup and view all the answers

Which task generally takes the longest time in flash memory?

<p>Erasing data. (D)</p> Signup and view all the answers

What is the purpose of wear leveling in flash memory?

<p>To distribute erase cycles evenly to prolong memory lifespan. (C)</p> Signup and view all the answers

Which of the following is an advantage of EEPROM over flash memory?

<p>Ability to erase single bits. (A)</p> Signup and view all the answers

What is the primary role of the controller within flash-based mass storage devices (e.g., SSDs)?

<p>To manage flash memory chips and provide a standard interface. (B)</p> Signup and view all the answers

What interface does eMMC (embedded MultiMediaCard) typically use?

<p>Serial Interface. (C)</p> Signup and view all the answers

Which protocol is typically used by SSDs connected via PCIe?

<p>Non-Volatile Memory Express (NVMe). (B)</p> Signup and view all the answers

What is the main advantage of Direct Memory Access (DMA)?

<p>Allows peripherals to directly access memory without CPU involvement. (C)</p> Signup and view all the answers

In a system using DMA, what configures the peripheral device for a memory transfer?

<p>The CPU via a memory-mapped interface. (C)</p> Signup and view all the answers

Which of the following is a direct benefit of DMA?

<p>Ability to maintain a constant data rate while the CPU processes data. (A)</p> Signup and view all the answers

In the context of a memory hierarchy within an MCU, how does the compiler typically manage memory usage for variables?

<p>It uses the fastest memory available first (registers, then SRAM). (A)</p> Signup and view all the answers

In the context of memory management in a Linux system, what occurs when the system runs out of RAM?

<p>The kernel swaps the least recently accessed (LRA) data to the storage device. (C)</p> Signup and view all the answers

What is the main role of flash memory in embedded systems?

<p>Persistently store code and data, such as the operating system, application code, and configuration settings. (E)</p> Signup and view all the answers

What is the standard sector size that software accesses on storage devices?

<p>Software accesses the storage by addressable blocks of fixed size, comparable to sectors on a hard disk drive. (C)</p> Signup and view all the answers

What is the standard interface provided to host CPUs by the storage device controller?

<p>Block device. (A)</p> Signup and view all the answers

What is the role of system software in accessing storage?

<p>The system software writes filesystem metadata. (A)</p> Signup and view all the answers

What is the primary role of processors and microcontrollers in embedded systems regarding processes?

<p>To control processes programmatically based on inputs and outputs. (D)</p> Signup and view all the answers

In the context of CPU architecture, what is the primary function of the Control Unit?

<p>To manage the flow of instructions and data within the CPU. (D)</p> Signup and view all the answers

When a CPU reads instructions from memory, what is the immediate next step in its general operation mode?

<p>Performing computation based on the instruction. (C)</p> Signup and view all the answers

Which aspect of processor architecture primarily dictates how software can instruct the CPU?

<p>The instruction set. (A)</p> Signup and view all the answers

What does the separation of Instruction Set Architecture (ISA) and microarchitecture enable?

<p>It allows for standardized instructions across different processor implementations. (D)</p> Signup and view all the answers

In the context of Instruction Set Architectures (ISAs), what is a defining characteristic of a CISC architecture?

<p>One instruction can describe a complex operation requiring multiple clock cycles. (C)</p> Signup and view all the answers

What is a key difference between CISC and RISC architectures in how they handle memory addresses?

<p>CISC architectures use calculated memory addresses in arithmetic operations, while RISC architectures use them primarily in load/store instructions. (A)</p> Signup and view all the answers

Why do modern processors often internally use a RISC architecture, even if their ISA is CISC?

<p>To improve performance by executing simpler instructions more quickly. (B)</p> Signup and view all the answers

In a RISC pipeline, why are dedicated hardware components used for different instruction processing steps?

<p>To keep components busy with different instructions simultaneously. (B)</p> Signup and view all the answers

During the Instruction Fetch (IF) stage of a RISC pipeline, what is the primary function related to memory?

<p>Fetching an instruction using the program counter (PC) as the address. (B)</p> Signup and view all the answers

During the Instruction Decode (ID) stage of a RISC pipeline, what is the role of registers?

<p>To provide fast memory for storing individual values and operands. (A)</p> Signup and view all the answers

In the Execute (EX) stage of the RISC pipeline, what condition determines the execution pathway when branching instructions are processed?

<p>Whether or not to branch, based on the conditions evaluated in this stage. (C)</p> Signup and view all the answers

During the Memory Access (MEM) stage in a RISC pipeline, what process ensures data consistency?

<p>The pipeline is stalled until the data is available. (B)</p> Signup and view all the answers

In the Write Back (WB) stage of a RISC pipeline, what condition allows the result to be written earlier during the MEM clock cycle?

<p>When an ALU operation occurs without memory interaction. (A)</p> Signup and view all the answers

In digital memory, what is determined by the bit width of the address signal?

<p>The maximum number of addressable bytes. (B)</p> Signup and view all the answers

How does Harvard architecture improve memory access compared to Von Neumann architecture?

<p>By providing separate memories for instructions and data, reducing interference. (D)</p> Signup and view all the answers

What characteristic defines the 'Load/Store' architecture?

<p>Exclusive memory access for data transfer to and from registers. (A)</p> Signup and view all the answers

For a microcontroller using memory-mapped I/O, how are peripherals typically accessed?

<p>Using the same instructions as accessing data memory. (C)</p> Signup and view all the answers

When a program interacts with a complex peripheral using memory-mapped I/O, what sequence of steps might it follow?

<p>Check the status register for data availability, read the data register, and then write to a control register to acknowledge receipt. (A)</p> Signup and view all the answers

In contrast to memory-mapped I/O, what is a defining trait of port-mapped I/O?

<p>Peripherals are on a separate address space and need specific instructions to access. (C)</p> Signup and view all the answers

What primary function does the processor package serve in relation to the integrated circuit (IC)?

<p>Mechanical protection and electrical connections to the PCB. (A)</p> Signup and view all the answers

What is a notable advantage of the Small Outline Package (SOP) over the Dual In-line Package (DIP)?

<p>Easier direct soldering onto the surface of a PCB with better routing of signals. (C)</p> Signup and view all the answers

What defines a Quad Flat Package (QFP) in terms of its pin configuration?

<p>Pins on all four sides, allowing for a higher pin count. (D)</p> Signup and view all the answers

Why are Ball Grid Array (BGA) packages particularly suitable for high-performance applications?

<p>They allow good heat transfer to the PCB and always soldered. (A)</p> Signup and view all the answers

What is a primary architectural difference between a Microcontroller Unit (MCU) and a CPU in a personal computer (PC)?

<p>An MCU has integrated memory and peripherals, while a PC CPU typically does not. (A)</p> Signup and view all the answers

What is a typical advantage of using Harvard memory-access architecture in a microcontroller?

<p>Optimization possibilities for fixed programs in Flash ROM. (B)</p> Signup and view all the answers

Which component is commonly integrated into an MCU to measure time intervals while the CPU performs other tasks?

<p>Timers. (A)</p> Signup and view all the answers

What is the most common purpose that MCUs use serial interfaces for?

<p>To enable communication with other devices, sensors, or systems. (A)</p> Signup and view all the answers

What distinguishes Atmel's AVR microcontrollers in terms of their programming ecosystem?

<p>Wide popularity thanks to Arduino HW platform and development environment. (C)</p> Signup and view all the answers

What best describes the ARM Cortex family in the context of processor manufacturing?

<p>A designer of ISAs that licenses core designs to other manufacturers. (A)</p> Signup and view all the answers

What makes the ARM architecture suitable for use in System-on-Chip (SoC) designs?

<p>Ability to integrate memory, GPU and modem into a single chip offering low power use and good integration. (B)</p> Signup and view all the answers

Which aspect of the ARM Cortex architecture most directly facilitates its widespread utilization across portable devices?

<p>Widespread ISA and low energy requirements. (C)</p> Signup and view all the answers

What distinguishes Xtensa architecture among other processor architectures regarding licensing and customization?

<p>It is a proprietary ISA that can be extended by licensees. (A)</p> Signup and view all the answers

Which characteristic of RISC-V architecture promotes its increasing adoption across various sectors?

<p>Designed by UC Berkeley to be modular and extensible. (B)</p> Signup and view all the answers

In what context is the x86 architecture typically utilized, as opposed to being commonly found in embedded systems?

<p>Primarily in high-performance desktop and laptop processors. (A)</p> Signup and view all the answers

What is a characteristic that commonly limits the utility of x86 processors in embedded systems?

<p>Their usual lack of integrated peripheral controllers, needing more high level connections. (B)</p> Signup and view all the answers

What is the consequence of a digital input pin having a low input impedance?

<p>The input pin alters the voltage of the signal source. (B)</p> Signup and view all the answers

Consider a digital output configured to drive an LED. If the output pin's impedance is not significantly lower than the LED's forward resistance, what is the most likely outcome?

<p>The correct voltage level required to fully illuminate the LED cannot be achieved. (D)</p> Signup and view all the answers

A microcontroller needs to detect the state of a mechanical switch. Why is a pull-up or pull-down resistor required?

<p>To define a known logic level when the switch is open, preventing a floating input. (B)</p> Signup and view all the answers

What is the effect of increasing voltage levels in a digital communication signal, such as in RS-232, on the signal's performance?

<p>It improves the signal-to-noise ratio (SNR) and robustness over longer distances. (D)</p> Signup and view all the answers

What is the primary advantage of using Low Voltage Differential Signaling (LVDS) in high-speed communication?

<p>LVDS effectively cancels out common-mode noise, improving signal integrity. (A)</p> Signup and view all the answers

A GPIO pin is configured as an input with a pull-up resistor enabled. If the external circuit connects the pin directly to ground, what state will the GPIO pin read?

<p>Low; the connection to ground overcomes the pull-up resistor. (C)</p> Signup and view all the answers

In the context of ISO/OSI model application in embedded systems, what advantage do well-defined interfaces between layers provide?

<p>Flexibility to exchange or update individual layer implementations without affecting others. (C)</p> Signup and view all the answers

In a UART communication system, what is the function of the 'start' and 'stop' bits?

<p>To indicate the beginning and end of a data frame for asynchronous communication. (B)</p> Signup and view all the answers

What is the primary reason that UART communication is not well-suited for connecting a large number of peripherals to a single microcontroller?

<p>UART requires a dedicated pair of pins for each peripheral, quickly exhausting the available pins. (A)</p> Signup and view all the answers

When using a USB-to-UART adapter on a Linux system, what is the significance of the device file /dev/ttyUSB0?

<p>It allows user-space applications to interact with the UART device via a virtual serial port. (D)</p> Signup and view all the answers

What is a potential security risk of leaving JTAG interfaces accessible on a product released to customers?

<p>It allows unauthorized debugging and reprogramming of the firmware, compromising device security. (C)</p> Signup and view all the answers

How does daisy-chaining in JTAG impact debugging and security considerations?

<p>It allows simultaneous access to all devices in the chain, improving debugging speed but increasing the attack surface. (C)</p> Signup and view all the answers

In I2C communication, what is the purpose of the START and STOP conditions?

<p>To signal the beginning and end of a communication transaction. (D)</p> Signup and view all the answers

What is the primary function of the ACK (Acknowledge) signal in I2C communication?

<p>To indicate that the receiving device has successfully received a byte of data. (B)</p> Signup and view all the answers

What is the key difference between I2C and SPI in terms of addressing devices on the bus?

<p>I2C employs addressing within the data stream, whereas SPI typically uses chip select lines. (A)</p> Signup and view all the answers

In an SPI communication, what is the purpose of the MOSI and MISO lines?

<p>MOSI is for transmitting data from the master to the slave, and MISO is for transmitting data from the slave to the master. (A)</p> Signup and view all the answers

In SPI communication, what purpose does the CS (Chip Select) line serve?

<p>CS is used to select a specific slave device for communication. (A)</p> Signup and view all the answers

What is the function of the CPOL and CPHA parameters in SPI communication?

<p>To configure the clock polarity and phase relative to the data. (B)</p> Signup and view all the answers

How are clock (SCL) and data (SDA) lines configured in I2C interface to allow multiple devices communicate with the bus?

<p>Using open-collector/open-drain configuration, each device pulls the line low, and pull-up resistors pull the line high. (D)</p> Signup and view all the answers

What is the primary difference between Serial Peripheral Interface (SPI) and Quad SPI (QSPI)?

<p>QSPI utilizes four data lines for parallel transmission, while SPI uses a single data line. (B)</p> Signup and view all the answers

How would configuring the drive strength on a GPIO pin impact its performance?

<p>It would modify the output impedance, affecting the pin's ability to source or sink current. (B)</p> Signup and view all the answers

What is the consequence of disabling JTAG access on a product after it has been deployed?

<p>It adds a layer of confidentiality and integrity by preventing reverse engineering or tampering. (B)</p> Signup and view all the answers

How can unintended JTAG access be mitigated? (Select all that apply)

<p>Utilizing one-time programmable fuses to permanently disable JTAG. (A), Disabling the JTAG interface in firmware. (B), Implementing physical security measures to restrict access to the device. (C), Removing JTAG pin headers from the PCB. (E)</p> Signup and view all the answers

Given two identical devices that need to communicate via the I2C protocol on the same bus, what technique is typically employed to differentiate them?

<p>Allowing set of select bits on the address by connecting pins to high or low. (D)</p> Signup and view all the answers

How pull-up resistors affect power consumption in I2C?

<p>The combination of supply voltage and pull-up resistor value determine the I2C bus's static power consumption. (B)</p> Signup and view all the answers

In an MCU without hardware support for SPI as a cost-saving measure, what is the most appropriate software workaround?

<p>Implement a bit-banging approach, manually controlling GPIO pins to emulate the SPI protocol. (B)</p> Signup and view all the answers

In complex scenarios involving multiple SPI slaves operating at diverse voltage levels (e.g., 1.8V, 3.3V, 5V, etc), what specialized hardware component is NECESSARY to facilitate seamless communication without causing hardware damage or reliability issues?

<p>A voltage level translator. (B)</p> Signup and view all the answers

What is the most significant trade-off when electing to use a software implementation of an I2C master, rather than leveraging dedicated hardware, in embedded systems?

<p>The increased CPU utilization, where the core sits to precisely emulate a complex timing. (B)</p> Signup and view all the answers

What inherent characteristic of single-ended signaling makes it more susceptible to noise, resulting in signal and reliability issues, compared to low-voltage, differential signaling?

<p>Its sensitivity to ground-shifts and electromagnetic coupling directly into the signal pathway. (A)</p> Signup and view all the answers

Before the ubiquity of integrated JTAG, developers connected external logic analyzers directly to device-pins, to perform low-level debugging. What is the most significant challenge when using JTAG for complex SoCs?

<p>The limitation presented by bandwidth, due to JTAG having low-speed in comparison to the signal speeds of modern, complex SoCs. (D)</p> Signup and view all the answers

How does electromagnetic interference impact sensors in embedded systems, even with effective I2C of SPI?

<p>Electromagnetic interference may couple noise into analog front ends of sensor systems, causing corrupted data. (C)</p> Signup and view all the answers

What software technique can be used to minimize the risk of corrupted data from the analog front end with external sensor systems?

<p>Oversampling, digital filtering and signal averaging. (B)</p> Signup and view all the answers

In automotive safety-critical and industrial control, what is the main reason it is crucial to carefully choose communication protocols regarding deterministic latency?

<p>To guarantee time-sensitive tasks are completed by deadlines for real-time control. (B)</p> Signup and view all the answers

Imagine a scenario with limited GPIO that must interface with numerous sensors and actuators, what interface is most adaptive?

<p>I2C. (B)</p> Signup and view all the answers

If a USB host negotiates High Speed (HS) mode with a device, what crucial change occurs in the electrical termination to maintain signal integrity?

<p>The host disables internal pull-up/pull-down resistors, and lines are terminated with 45 Ω resistors to ground. (D)</p> Signup and view all the answers

What is the principal role of the USB host during the enumeration process immediately after a USB device is physically connected?

<p>To retrieve predefined data structures called descriptors from the device. (D)</p> Signup and view all the answers

In USB communication, how does single-ended signaling present in USB 1.1 contribute to device detection and speed determination (Low Speed vs. Full Speed)?

<p>By using a combination of pull-up and pull-down resistors on the host and device, with the host sensing the resulting single-ended voltage. (D)</p> Signup and view all the answers

Under what circumstance is a USB device required to retransmit a packet during a Bulk transfer, as determined by the USB protocol layers?

<p>If a NAK handshake packet is received by the transmitter, indicating data corruption. (C)</p> Signup and view all the answers

How does the Low Pin Interface (ULPI) serve as a compromise between parallel and serial interfaces for USB 2.0 Transceiver Macrocell Interface (UTMI+)?

<p>By using 12 pins to provide serial access to UTMI+ signals. (A)</p> Signup and view all the answers

What is the most critical operational characteristic of the CAN (Controller Area Network) protocol's physical layer with respect to signal behavior?

<p>The utilization of differential signaling with two bus states, dominant and recessive, to enhance noise immunity. (A)</p> Signup and view all the answers

In a CAN network, what determines the state of the bus (dominant or recessive) during arbitration when multiple nodes transmit simultaneously?

<p>The node transmitting the logical '0' (dominant state) overrides the node transmitting the logical '1' (recessive state). (D)</p> Signup and view all the answers

In the context of CANopen, what is the primary role of 'object dictionaries' as standardized interfaces for different application areas?

<p>To specify the data structures and communication protocols for specific device functionalities, promoting modularity and interoperability. (C)</p> Signup and view all the answers

How is galvanic isolation achieved in Ethernet PHYs, and what primary benefit does it provide to network devices?

<p>By using transformers to couple signals to the wire pairs, eliminating DC components and preventing ground loops. (D)</p> Signup and view all the answers

Concerning the IEEE 802.3 standard for Ethernet, what is the fundamental purpose of shielding twisted-pair cables, especially in electromagnetically noisy environments?

<p>To reduce crosstalk between wire pairs and minimize sensitivity to electromagnetic interference (EMI). (C)</p> Signup and view all the answers

How does the channel encoding scheme in Wireless LAN (WLAN) directly contribute to enhanced communication reliability, and what trade-off is inherently involved?

<p>By implementing a forward error correction (FEC) mechanism through the addition of redundancy bits, at the cost of reduced effective data rate. (D)</p> Signup and view all the answers

In the context of WLAN security, what is the primary vulnerability of Wired Equivalent Privacy (WEP), and why is it considered insecure?

<p>WEP employs a short, static encryption key and a flawed algorithm, making it susceptible to cryptographic attacks. (C)</p> Signup and view all the answers

What is the purpose of frequency division multiplexing (FDM) in wireless communication systems, and how does it address potential signal interference?

<p>FDM divides the available bandwidth into multiple non-overlapping frequency channels, allowing simultaneous transmission without interference. (B)</p> Signup and view all the answers

In the context of Zigbee networks, how do mains-powered devices enhance network scalability and coverage, and what critical function do they perform?

<p>Mains-powered devices serve as routers, forwarding data between other devices to build large, meshed networks. (B)</p> Signup and view all the answers

What operational characteristic allows LoRaWAN technology to achieve very long-range communication for IoT devices, especially in sparsely populated or rural environments?

<p>LoRaWAN uses a proprietary physical layer modulation technique, optimized for long-range, low-power communication. (B)</p> Signup and view all the answers

In wireless communication systems, what is the purpose of dynamic frequency selection (DFS), and under what regulatory constraints is it typically mandated?

<p>To avoid interference with radar systems by dynamically selecting a different frequency channel. (B)</p> Signup and view all the answers

In the context of USB 2.0, if a host detects a device connected to a hub and identifies it as a Full Speed (FS) device, how does it determine this speed?

<p>The host senses the single-ended voltage on the data lines based on pull-up resistors on one of the lines at the device. (D)</p> Signup and view all the answers

What is the principal limitation that prevents UART from being a practical solution for connecting a large number of peripherals to a single microcontroller?

<p>UART requires a dedicated pin on the microcontroller for each device, severely limiting scalability. (D)</p> Signup and view all the answers

In Controller Area Network (CAN) communication, what mechanism ensures messages of higher importance are prioritized and transmitted first when multiple nodes try to send data at the same time?

<p>Non-destructive bitwise arbitration occurs during which nodes transmitting a dominant bit override recessive bits. (B)</p> Signup and view all the answers

What is a defining characteristic that necessitates dynamic frequency selection (DFS) in certain Wireless LAN (WLAN) applications?

<p>The requirement to coexist with radar systems operating in the same frequency bands. (C)</p> Signup and view all the answers

What is the distinct characteristic that differentiates Bluetooth Low Energy (BLE) from Classic Bluetooth regarding energy consumption and application areas?

<p>BLE is characterized by significantly lower power consumption, making it suited for low-duty cycle applications like beacons and sensors. (A)</p> Signup and view all the answers

What is the most significant benefit of employing multicarrier modulation techniques, such as OFDM in 802.11a/g/n WLAN standards?

<p>Increased immunity to intersymbol interference in frequency-selective channels. (A)</p> Signup and view all the answers

In the context of Direct Memory Access (DMA) operations, what potential issue should engineers consider regarding cache coherency while interacting with hardware peripherals?

<p>DMA writes may update main memory without updating the CPU cache, leading to stale data, requiring cache invalidation or write-through policies. (D)</p> Signup and view all the answers

What are the implications of integrating multiple radios, such as Wi-Fi and Bluetooth, within a single embedded system regarding resource management, power consumption and interference mitigation?

<p>Careful time management of transmission slots and frequency selection will minimize any sort of potential cross-talk or interference. (B)</p> Signup and view all the answers

Regarding the software configuration and control of physical interfaces like USB, Ethernet, or wireless, what is the role of device drivers in an operating system like Linux?

<p>Device drivers handle the interactions between a userspace program and a given physical device, by translating high-level API calls into low-level hardware commands. (C)</p> Signup and view all the answers

When an engineer faces the challenge of selecting a wireless communication protocol for an IoT application requiring ultra-low power consumption and a mesh network topology, what would be the factors influencing the choice between Zigbee and LoRaWAN?

<p>A mains-powered device acting as a Zigbee router allowing to build a largely meshed network to save energy, paired with careful considerations regarding bandwidth and the application will make Zigbee competitive while LoRaWAN’s topology greatly affects the network. (D)</p> Signup and view all the answers

When a CAN bus system experiences frequent data corruption and communication errors, what possible hardware and configuration checks are the most critical to perform first to diagnose and resolve these issues?

<p>Ensure proper bus termination with 120 Ω resistors at both ends and that all nodes connect to same medium. (D)</p> Signup and view all the answers

In high-speed data transmission over physical media, what role does channel bandwidth perform, and what are some limiting factors for it?

<p>Channel bandwidth determines the maximum data throughput. Some limiting factors for channel bandwidth are regulations, cost, and path loss profiles. (D)</p> Signup and view all the answers

In an embedded system that communicates with the outside world, what is the relationship between Layer 1 of the OSI model and the physical interface?

<p>Layer 1 defines the physical interface which implements the transmission of raw bits over a physical medium. (C)</p> Signup and view all the answers

Considering wireless devices in the unlicensed spectrum, what steps are required to have a regulatory body certify a product?

<p>Regulatory bodies require products to be certified to operate in unlicensed spectral bands so that devices do not interfere with each other. (A)</p> Signup and view all the answers

What are the three electrical states defined to signify data on an old USB bus?

<p>J, K, SE0 (Single Ended Zero) (A)</p> Signup and view all the answers

In order to interface the data lines in a USB-2.0 device with the data lines a micro controller, what interface may be used?

<p>UTMI+ (USB 2.0 Transceiver Macrocell Interface) (B)</p> Signup and view all the answers

What best describes a USB descriptors

<p>Data structures that describe a USB device. (D)</p> Signup and view all the answers

A physical address, the address to a device, of a USB is defined by how many bits?

<p>7 (D)</p> Signup and view all the answers

What is the transfer speed of USB 3.2?

<p>20 Gbit/s (B)</p> Signup and view all the answers

What is the speed of CAN-High (CAN-H) when in the Dominant state?

<p>Much greater than CAN-Low (CAN-L) (A)</p> Signup and view all the answers

Regarding Ethernet physical layer connection, what is the RJ45 most commonly connected to?

<p>8 position 8 contact connector (8P8C) (D)</p> Signup and view all the answers

How are IP addresses obtained and assigned?

<p>Dynamic Host Configuration Protocol (DHCP) (C)</p> Signup and view all the answers

Is a device typically configured for peer to peer connection or infrastructure when using WLAN?

<p>Infrastructure commonly but peer to peer is possible (A)</p> Signup and view all the answers

Flashcards

Kernel Drivers

Software functions that react to userspace applications, allowing access to hardware devices via the filesystem interface.

Usable Device Drivers

Many are already in the kernel and usable as-is. Activation and build-time parametrization may be needed.

Parametrization via Device Tree

Device tree files parametrize drivers to use hardware correctly by setting parameters like I2C frequency.

New Drivers for Peripherals

Allows communication with new hardware via UART, SPI, I2C, USB, etc., benefitting customers.

Signup and view all the flashcards

Drivers for FPGA Hardware

Drivers for memory-mapped interfaces in the FPGA part of a SoC, for product-specific hardware.

Signup and view all the flashcards

Hierarchical Driver Architecture

Drivers can be used in a hierarchical way, where one driver uses another, accessing each other's functions directly.

Signup and view all the flashcards

Filesystem

A way to organize data in a tree-like structure with a root directory, subdirectories, and files.

Signup and view all the flashcards

Storage Device

NAND-based, divided into blocks; if one byte is written, the whole block is read, modified, and written back.

Signup and view all the flashcards

Raw Access

Reading/writing directly to individual blocks of storage, bypassing filesystems/partitions.

Signup and view all the flashcards

Disk Partitioning

Dividing a storage device into internally contiguous, externally disjunct areas.

Signup and view all the flashcards

MBR Partition Table

An older (1983) format, limited to 4 partitions and 2 TiB.

Signup and view all the flashcards

GPT Partition Table

A modern format, part of UEFI, allowing up to 128 partitions and 8 ZiB.

Signup and view all the flashcards

Filesystem Types

Different types of file systems with differing Linux and Windows file systems, and special types

Signup and view all the flashcards

Virtual Filesystems

Filesystems exposing kernel information/functionality to userspace, such as the Linux procfs and sysfs.

Signup and view all the flashcards

Root Filesystem (RootFS)

The file system of the main partition of a Linux system, containing specific directories.

Signup and view all the flashcards

Mounted File Systems

Partitions that are mounted to a directory (mount point) somewhere within the RootFS tree.

Signup and view all the flashcards

Loop Device

A virtual device mapping a binary file to a block device driver, used when generating disk images.

Signup and view all the flashcards

Initial RAM Filesystem (initramfs)

A preinitialized filesystem loaded into RAM by the bootloader, mounted as RootFS.

Signup and view all the flashcards

Kernel Drivers

Compiled into kernel image or as loadable kernel modules (.ko files) in /lib/modules/.

Signup and view all the flashcards

Module Compilation Options

Drivers that can be disabled are a tristate option.

Signup and view all the flashcards

Source Code

The actual C and header files

Signup and view all the flashcards

Kconfig file

Defines if the driver can or cannot selected and configured the driver when configuring the kernel

Signup and view all the flashcards

Makefile

Specifying the build rules for the driver

Signup and view all the flashcards

Out of Tree Module

Allowing to compile a kernel driver module without integrating in the kernel source tree

Signup and view all the flashcards

Kernel space memory

Memory location containing .data bss and .heap and more

Signup and view all the flashcards

Sysfs Interface

Listed via SysFS, and character devices for consistent i/o operations

Signup and view all the flashcards

Tick-based multitasking

Operation based on ticks allows easy multitasking.

Signup and view all the flashcards

Super-Loop

Tasks execute sequentially in one main loop.

Signup and view all the flashcards

Cooperative Multitasking

Task exits early, yielding CPU to other tasks during wait.

Signup and view all the flashcards

State Storage in Cooperative Multitasking

Tasks yield CPU, must store current state for continuation.

Signup and view all the flashcards

Preemptive Multitasking

Task management by scheduler with preemption.

Signup and view all the flashcards

Context Switch

Task state saved/restored by RTOS during task switches.

Signup and view all the flashcards

Running (Task State)

Task is currently executing.

Signup and view all the flashcards

Ready (Task State)

Task ready for execution but not currently running.

Signup and view all the flashcards

Blocked (Task State)

Task waiting for an event; not executing.

Signup and view all the flashcards

Synchronization Mechanisms

Mechanisms to protect shared resources.

Signup and view all the flashcards

Task Preemption

Task with higher priority preempts lower-priority task.

Signup and view all the flashcards

First-In, First-Out (FIFO)

Tasks execute in order of becoming ready.

Signup and view all the flashcards

Earliest Deadline First

Tasks execute by increasing deadline.

Signup and view all the flashcards

Round-Robin Scheduling

Tasks moved to 'ready' after a time slice.

Signup and view all the flashcards

GNU/Linux

Popular OS for embedded systems, open-source & configurable.

Signup and view all the flashcards

Linux Kernel

Manages resources, processes and hardware.

Signup and view all the flashcards

MMU

Isolated memory regions.

Signup and view all the flashcards

System Call Interface (SCI)

Interface to kernel functionality for userspace processes.

Signup and view all the flashcards

Device Files

Files that drivers provides.

Signup and view all the flashcards

Configuring the Linux Kernel

Select code parts, link into the kernel.

Signup and view all the flashcards

Kconfig

Tool for managing kernel options.

Signup and view all the flashcards

Board Support Package (BSP)

Software components to run an OS.

Signup and view all the flashcards

Device Tree File

Specifying hardware components of the sys.

Signup and view all the flashcards

Bootloader

Loading kernel into memory.

Signup and view all the flashcards

Linux Distribution

Set of software packages for a usable Linux system.

Signup and view all the flashcards

Yocto Project

Software building tool.

Signup and view all the flashcards

BitBake

Open source Project's core tool.

Signup and view all the flashcards

Memory Definition

A component of a computing system that can store information to be accessed later.

Signup and view all the flashcards

Word (Memory)

The smallest addressable unit of memory.

Signup and view all the flashcards

Memory Address

An L-bit number that identifies a specific location for data storage within the memory.

Signup and view all the flashcards

Row/Column Address

Splitting the memory address into parts to specify a row and column in a memory array.

Signup and view all the flashcards

Memory Hierarchy

A ranking system of different types of memory based on speed, cost, and capacity.

Signup and view all the flashcards

Volatile Memory

Memory that loses its data when power is removed.

Signup and view all the flashcards

Static RAM (SRAM)

RAM that retains data as long as power is supplied; based on flip-flops.

Signup and view all the flashcards

Dynamic RAM (DRAM)

RAM that stores data as charge on capacitors; requires periodic refreshing.

Signup and view all the flashcards

SDRAM

Synchronous DRAM, synchronized to a clock signal for efficient data access.

Signup and view all the flashcards

Double Data Rate SDRAM (DDR)

A type of SDRAM that transfers two data words per clock cycle.

Signup and view all the flashcards

LPDDR-SDRAM

Low Power DDR SDRAM, designed for mobile devices to reduce power consumption.

Signup and view all the flashcards

CPU Cache

Small, fast memory inside a CPU that stores frequently accessed data.

Signup and view all the flashcards

Cache Fill

Copying data into the cache.

Signup and view all the flashcards

Write-Through Cache

Policy where data is immediately written to both cache and main memory.

Signup and view all the flashcards

Write-Back Cache

Policy where data is written only to the cache, updating main memory later.

Signup and view all the flashcards

Persistent Memory

Memory that retains data even when power is removed.

Signup and view all the flashcards

Semiconductor Storage

Memory technology using floating-gate MOSFET transistors to store data.

Signup and view all the flashcards

Flash Memory

A type of non-volatile memory where data is stored in cells.

Signup and view all the flashcards

NOR Flash

Flash memory where bit lines are pulled to 0V if any cell conducts current.

Signup and view all the flashcards

NAND Flash

Flash memory where bit lines are pulled to 0V only if all cells conduct current.

Signup and view all the flashcards

Erasing Flash Memory

Process of discharging the floating gate in flash memory cells, typically interpreted as a logical '1'.

Signup and view all the flashcards

Programming Flash Memory

Process of charging the floating gate in flash memory cells to represent a logical '0'.

Signup and view all the flashcards

EEPROM

Memory that can be electrically erased and reprogrammed.

Signup and view all the flashcards

Flash-Based Mass Storage

Mass storage devices based on flash memory.

Signup and view all the flashcards

SSD

Solid State Drive, using flash memory for data storage.

Signup and view all the flashcards

Memory Controller (MC) in direct memory access

A dedicated hardware component that manages the data transfer between system memory and peripherals, without constant CPU intervention.

Signup and view all the flashcards

Purposes of Microcontrollers

Control processes in a system programmatically, react to inputs, and generate outputs.

Signup and view all the flashcards

General CPU Operation Mode

Reads instructions/data, performs computations, writes results, determines next instruction address; then repeats.

Signup and view all the flashcards

Processor Architecture Characteristics

Instruction set, data format, register layout, memory access methods, access to peripherals.

Signup and view all the flashcards

Instruction Set Architecture (ISA)

The set of assembler instructions available for a given processor.

Signup and view all the flashcards

Microarchitecture

Internal realization of a processor's behavior and capabilities.

Signup and view all the flashcards

Complex Instruction Set Computer (CISC)

One instruction describes a complex operation, needing multiple clock cycles.

Signup and view all the flashcards

Reduced Instruction Set Computer (RISC)

Each instruction is a simple operation completed within one clock cycle.

Signup and view all the flashcards

Modern Processors' Internal Architecture

Processors internally have RISC architecture, even with CISC ISAs.

Signup and view all the flashcards

RISC Pipeline

Breaks instruction processing into dedicated hardware component stages in a sequence.

Signup and view all the flashcards

Instruction Fetch (IF) Stage

Fetches one instruction from memory using the program counter (PC) as the address.

Signup and view all the flashcards

Instruction Decode (ID) Stage

Sets control signals and reads operands from registers.

Signup and view all the flashcards

Execute (EX) Stage

Performs operation specified by the instruction using the ALU.

Signup and view all the flashcards

Memory Access (MEM) Stage

Reads/writes data from/to memory.

Signup and view all the flashcards

Write Back (WB) Stage

Writes the result of the memory access or execute operation to a register.

Signup and view all the flashcards

Digital Memory

Collection of storage cells holding binary values grouped into addressable bytes.

Signup and view all the flashcards

Harvard Architecture

Separate memories for instructions and data, improving performance.

Signup and view all the flashcards

Von Neumann Architecture

Unified memory for instructions and data, allowing self-modifying code.

Signup and view all the flashcards

Load/Store Architecture

Access memory only to transfer data to and from registers.

Signup and view all the flashcards

Memory-mapped I/O

Peripherals share the same address space as data memory, accessed with same instructions.

Signup and view all the flashcards

Port-mapped I/O

Peripherals have a separate address space, requiring specific instructions to access.

Signup and view all the flashcards

Purposes of Processor Packages

Mechanical protection, electrical connections, standardization, heat dissipation, and sometimes shielding.

Signup and view all the flashcards

Dual In-line Package (DIP)

Can be soldered through-hole or plugged. Standard pin spacing, popular among hobbyists.

Signup and view all the flashcards

Small Outline Package (SOP)

SMD version of DIP, soldered directly onto a PCB for routing signals.

Signup and view all the flashcards

Quad Flat Package (QFP)

Quadratic version of SOP with pins on all four sides to increase pin count

Signup and view all the flashcards

Pin Grid Array (PGA)

Pins on bottom in rows used in early desktop CPUs, plugged into socket.

Signup and view all the flashcards

Land Grid Array (LGA)

Flat contacts replace pins, electrically contact by pressing to pins in the socket.

Signup and view all the flashcards

Ball Grid Array (BGA)

Contacts are solder balls, always soldered to the PCB for good heat transfer.

Signup and view all the flashcards

Microcontroller Unit (MCU)

Processor plus memory plus peripherals.

Signup and view all the flashcards

CPU (Personal Computer)

Processor only, operates at higher clock frequencies, loads programs at runtime.

Signup and view all the flashcards

Atmel

Manufacturer of microcontrollers and embedded hardware acquired by Microchip.

Signup and view all the flashcards

PIC

First microcontroller from Microchip Technologies acquired Atmel

Signup and view all the flashcards

ARM Cortex

Advanced RISC Machine, widespread ISA in portable devices, Cortex-M, Cortex - R, A

Signup and view all the flashcards

Xtensa

ISA designed by Tensilica, used in ESP8266 and ESP32 micro-controllers, with C/C++ support

Signup and view all the flashcards

RISC-V

Open source ISA designed by UC berkeley

Signup and view all the flashcards

x86

CISC ISA used in desktop and laptops.

Signup and view all the flashcards

Pins (Microcontroller)

Physical connections between a microcontroller and external components.

Signup and view all the flashcards

Pin Function

Driving or reading signals in digital or analog format.

Signup and view all the flashcards

Digital Input

Amplifier that converts input voltage to a high or low interpretable value.

Signup and view all the flashcards

High Input Impedance

High resistance to prevent loading the signal source.

Signup and view all the flashcards

Digital Output

Driver circuit forcing pin voltage to high or low level.

Signup and view all the flashcards

Pull-up/Pull-down Resistors

Resistors connected to a pin to set a defined value when no external driver is connected.

Signup and view all the flashcards

Voltage Levels of Pins

Standardized voltage levels for digital pins, defining limits for driving and detecting signals.

Signup and view all the flashcards

Higher Voltages in Pins

Increase signal-to-noise ratio, maintain signal integrity over long distances.

Signup and view all the flashcards

Lower Voltages in Pins

Reduces power consumption and electromagnetic interference, and makes faster speeds

Signup and view all the flashcards

Low Voltage Differential Signaling (LVDS)

Uses two signals with opposite polarity. The receiver ignores the common mode voltage.

Signup and view all the flashcards

LVDS Use Cases

Used for high-speed communication, e.g. video stream between CPU and display or camera.

Signup and view all the flashcards

General Purpose Input/Output (GPIO)

Pins used to read or write individual digital values.

Signup and view all the flashcards

GPIO Pin Configuration

Software can select the function via a memory-mapped register.

Signup and view all the flashcards

GPIO Pin Configurable Elements

Pull-up/down resistors, drive strength, etc.

Signup and view all the flashcards

ISO/OSI Reference Model

Conceptual model for communication systems with seven layers, each having a specific function.

Signup and view all the flashcards

Universal Asynchronous Receiver Transmitter (UART)

A layer-2 implementation for serial communication between two computers.

Signup and view all the flashcards

UART Asynchronous

No clock signal is part of the interface.

Signup and view all the flashcards

UART Wires

Transmit and receive wires, and ground for voltage reference.

Signup and view all the flashcards

UART Usage

To transmit text or arbitrary binary data, allowing application-specific protocols.

Signup and view all the flashcards

UART Configuration

Sender and receiver configured with the same communication parameters; commonly used.

Signup and view all the flashcards

UART Parameters

Baud rate, number of data bits, parity, number of stop bits.

Signup and view all the flashcards

USART

UART with optional synchronous clock signal. Not commonly used.

Signup and view all the flashcards

UART Use

Used for observing debug output of a microcontroller.

Signup and view all the flashcards

UART in Embedded Linux

Also known as serial console or TTY (teletype).

Signup and view all the flashcards

Joint Test Action Group (JTAG)

A standard for testing integrated circuits.

Signup and view all the flashcards

JTAG Topology

Daisy chain signal passed through all devices.

Signup and view all the flashcards

JTAG - Usage

Read and modify internal state of a chip. Access flash memory; debug programs.

Signup and view all the flashcards

Disabling JTAG

Not soldering or routing JTAG pins, or chip-level measures (firmware register)

Signup and view all the flashcards

Inter-Integrated Circuit (I²C) - Logical Topology

One controller device controls communication; multiple target devices are connected.

Signup and view all the flashcards

I²C - Physical Topology

Multiple devices connected to the same pair of wires: SCL and SDA.

Signup and view all the flashcards

I²C - protocol

Transfer is done in 8-bit bytes, and the controller initiates communication by sending conditions

Signup and view all the flashcards

I²C - Usage

Small stroage, SMBus, Two-wire interface. compatible I2C devices.

Signup and view all the flashcards

Serial Peripheral Interface (SPI) - Topology

One main device controls communication; multiple subnode devices are connected.

Signup and view all the flashcards

Two physical topologies of SPI

Bus on MISO/MOSI and SCLK, or Daisy chain on MISO/MOSI.

Signup and view all the flashcards

SPI - Protocol

Data transmission happens bidirectionally; The Main device generates the clock signal on SCLK while a subnode is seleceted.

Signup and view all the flashcards

Universal Serial Bus (USB)

A wired interface standard used to connect peripherals to a host device.

Signup and view all the flashcards

USB Topology

Star topology where a central host communicates with peripherals. Only two devices connect directly at the physical layer.

Signup and view all the flashcards

Controller Area Network (CAN)

A network protocol that used in automotive and industrial applications for real-time control.

Signup and view all the flashcards

CAN Differential Signaling

Data transmission method using two wires, where the signal is the difference between the two.

Signup and view all the flashcards

CAN Bus Topology

CAN network topology connects all devices to the same two wires.

Signup and view all the flashcards

Ethernet

A network protocol defining physical and data link layers for local area networks (LANs).

Signup and view all the flashcards

Star Ethernet Topology

The physical layout of Ethernet which connects all devices through a central switch or hub.

Signup and view all the flashcards

LoRaWAN

A communication protocol with a high range but limited bandwidth.

Signup and view all the flashcards

Ethernet Data Link Layer

In Ethernet, this layer specifies frame format

Signup and view all the flashcards

Wireless LAN

IEEE 802.11 standard for a wireless extension of Ethernet.

Signup and view all the flashcards

Bluetooth

A wireless technology operating in the 2.4 GHz ISM band.

Signup and view all the flashcards

Zigbee

A wireless technology defines application layer protocols, based on IEEE 802.15.4.

Signup and view all the flashcards

Baseband Modulation

Technique of modulating a baseband signal onto a carrier frequency for wireless transmission

Signup and view all the flashcards

Frequency Division Multiplexing (FDM)

A common practice of dividing the spectrum into multiple channels to avoid interferences.

Signup and view all the flashcards

Study Notes

Advanced Communication Interfaces

  • Layer 1 of the OSI model (PHY, transmission of raw bits over a physical medium) is implemented in hardware, either on a separate chip or integrated into the MCU/SoC.
  • High data rate communication allows multiple peripherals to communicate with a host, and sometimes with each other.
  • Advanced interfaces offer high configurability.
  • Application software relies on driver functions to access the interface and maintain connections automatically.

Physical Layer in High-Rate Communications

  • The transmitter (TX) encodes bits to symbols, then to an analog signal.
  • The receiver (RX) reverses the process.
  • Higher data rates typically require higher signal bandwidth.
  • Channel bandwidth is limited by regulations, cost, or path loss profiles.
  • Signals are attenuated and distorted by noise and interference on the channel and in TX/RX; RX compensates for these effects, which can make it more complex than TX.

Universal Serial Bus (USB)

  • USB is a wired interface for connecting peripherals to a host.
  • The logical and physical topology is a star.
  • Two devices connect on the physical layer directly.
  • Optionaly one or both connected to a hub.
  • The host controls a USB bus
  • Only devices can communicate with the host.
  • USB eliminates the need for separate interfaces for each peripheral but different connectors can defeat this purpose.
  • Plug and play capability and power supply simplifies it's use.

USB Generations

  • USB 1.1 has data rates of 1.5 Mbit/s (Low Speed, LS) and 12 Mbit/s (Full Speed, FS).
  • USB 2.0 has a data rate of 480 Mbit/s (High Speed, HS).
  • USB 3.0 has a data rate of 5 Gbit/s (Super Speed, SS).
  • USB 3.1 has a data rate of 10 Gbit/s (Super Speed+).
  • USB 3.2 has a data rate of 20 Gbit/s (Super Speed+).

USB 1.1 Electrical Interface

  • Host has pull-down resistors on both data lines, while device has pull-up resistor on line.
  • The host senses the single-ended voltage on the data lines to detect device presence and speed (LS vs. FS).
  • Three line states used for signaling, defined by voltage on the wires: Single-ended zero "SEO" where both data lines pulled low, "J" which is differential in idle state (D+ high in FS, D- high in LS), and "K" which is differential and opposite to "J".

USB 2.0 Electrical Interface

  • During speed negotiation, line termination is as in FS mode.
  • After switch to High Speed (HS).
  • Pull-ups and pull-downs are disabled, and line is terminated with 45 Ω to ground on both wires which matches the cable impedance (Zw = 90 Ω).
  • Data is transferred by 17.78 mA into the D+ or D- line.
  • The voltage difference between the lines is +/- 400mV.
  • USB 3.0 and newer use two signal pairs with signal processing and more coding.
  • Data is transferred in packets of 1, 3, or more bytes with a max of 1024.
  • Maximum bytes per packet are dependent on packet type.
  • Packet type is encoded in the first byte (Packet identifier PID).
  • Packets are so-called handshake packets, contain no checksum,
  • three packets contain a CRC-5 checksum, and the longer ones a CRC-16 checksum.
  • Accessing data lines, termination, proper serialization, etc., is mainly implemented in hardware.
  • The standardized parallel interface is the "USB 2.0 Transceiver Macrocell Interface" (Utmi+).
  • If the data link layer is implemented on the same chip: UTMI is used
  • If the PHY is a separate chip, the high number of signals used in UTMI+ is not practical.
  • Compromise: UTMI+ Low Pin Interface (ULPI) with 12 pins provides serial access to UTMI+ signals.
  • USB 3.0 and newer use different interfaces, e.g. PHY Interface for the PCI Express and USB 3.0 Architectures (PIPE).

USB Network & Transport Layers

  • A device has a unique 7 bit address, this is assigned by the host during enumeration.
  • Packets are grouped into transactions, always initiated by the host.
  • First packet is a token packet, containing the address of the target device.
  • Contains Endpoint number within the device.
  • Requested direction of transfer "host > device" (OUT) to device or direction ""device -> host" (IN) from device
  • Second packet is a data packet, followed by a third handshake packet (ACK/NAK).
  • Retransmissions can be required if errors are detected, depending on transfer type.

USB Enumeration

  • When a device is detected, the hub performs speed detection - LS, FS or HS and reports to the host.
  • Host retrieves so-called descriptors from the device of predefined data structures containing information:
    • Device vendor and product ID, device class.
    • Configuration of offered interfaces and power consumption.
  • During process, host assigns an address.
  • If driver software is found by OS, the device is configured and then is ready for use.

USB Usage

  • A device can be a function or a host.
  • Function is a microcontroller or an FPGA/ASIC: Lower layer functionality accessed via driver functions or IP cores, with payload generated/consumed by the application.
  • Host runs an operating system - usually a CPU-based device provides an USB host stack.
  • Can take care of enumeration and flow control and implement host controller interfaces like OHCI, UHCI, EHCI, xHCI
    • Application accesses function either via existing device class driver, or implements endpoint handling, and some preparation steps for UDEV Linux.
  • For custom devices, host application must implement protocol, utilizing the library libusb.
  • Session- and presentation-layer interface specifications for different types of devices.
  • Allows host application to access device functions transparently without need for a custom driver resulting in plug and play.
    • Human Interface device (HID) and Mass Storage Device (MSD) are supported.
    • Audio devices and printers are also supported

Controller Area Network (CAN)

  • Designed by Bosch initially for automotive applications.
  • Then used for complex embedded systems and also, industrial automation, medical equipment, etc Physical Topology, Bus
  • On physical, devices connect via two wires, typically high/ Low-speed wires with resistors at the ends Logical Topology, Bus
  • Each device can communicate with another/higher layers and can implement Star topologies for specific application.
  • Typically, twisted cables are utilized to avoid interference with two states.

CAN Physical Layer

  • CAN uses two dominant states. Dominant(LOW signal, voltage signal >CAN signal-voltage), and the Recessive signal(CAN voltage= CAN voltage) with 120 terminal resisters.

CAN Higher Layer example

  • Can open defines the protocols in Data link layers along with protocols also for the application layer that is maintained by CIa.

Ethernet

  • It's used at the Layer 2 and layers of area network , the logical network is configured by Bus
  • The computer is possible to configure with Star, and can be forward by hub device ,or other configurations.

Ehernet - Physical Layer (1)

  • Elctrical interface is standardized according to IEEE 802.3
  • the cable is twisted into four wires to aviod resistance of 100.
  • Shielded for crosstalk (EMI)
  • It can use 10 and 100, all of wires can be applied and identified as RJ45.

Ehernet - Physical Layer (2)

  • The Device is galvanically isolated and the encoding passes no DC componets but the Noise.
  • The protocol can be implemented when the implementation allows for different Link. the standard interface is used with Media Independant Interface(MII) and reduced Interface from the device
  • The manufactured can apply device of 48 bits from the transfer of frame of 64 bytes or 15 bytes
  • It can transmit if an error, like in a CRC byte form, with TCP transmissions for retransnmissions.

Internet Protocol - IP (1)

  • specifies the physical and data link, is the physical configuration , how to routes also between networks. and does not requir Ethernet.

Internet Protocol - IP (2)

  • Contains netowrk and host parts
  • Adresses for the network handle MAC adresses that uses IP
  • Handling and protocols for the Dynamic Host Congiration.

Wireless Interfaces

  • The signal is modulated form baseband to the frequency ( FDM ).
  • Higher dates for expensive licences from Cost interference with low ones.
  • It is important for continuos research(spectrum efficiency)

Wireless LAN

  • It is a protocol standard from the extensions with Ethernet , used at unlicensed spectrum.
  • Trademark-ed with Certification to ensure that all models on IEEE. can communicate point-to-point by usually infrastcture, which is managed by access point.(AP)

Wireless LAN - PHY

  • It works across OFDM Subcariers, and allow equalazition.
  • Possible to increase throughtout per channel.
  • Wireless is also applicable here

Wireless LAN - Performance improvements

  • Channel adds more redudency by 100 percent depends on the line. Sub carries are usually modulated on N-QAM bits
  • can be use multipe inputs and spatial increasing streames, but only at increased costs.

WLAN - Security

  • No ethernet cable here so there can be possible security with user and a standard like wired equivaleny privacy.

WLAN - Usage

The configuration from mainataince, it is possible with Interent sometimes , The Interfacce is applicable for web access application, and mostly based on OS and LINUX.

Bluetooth

  • Named from king Herald and built peronsal area network(PAN).
  • Mostly used as replaicment wireless and used by multi application purposes.
  • It works on 2.4 and uses spead spectrum by modulation
  • Has two data rates, and is possible also without energy in generations 4.
  • It is mostly used for beacon access and application purposes for navigation for covid track

Zigbee

  • Zigbee can define and network through applicaiton and Layer protocols.
  • Use a standard like transmission of environemnmtal from automartio with 250 kbit/ band

LoRaWAN

  • It can effiecinctly maintain high range and specififcally designed for network of things, and follows Sematic and can transmit 15 km depending on the envirnment
  • Transmits 3 to 50 kbit at band

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser