Podcast
Questions and Answers
Which of the following best describes an embedded system?
Which of the following best describes an embedded system?
- A high-performance server used for data processing and storage.
- A system designed to perform one or a few dedicated functions, often within an electronic device. (correct)
- A network of interconnected computers communicating over the Internet.
- A general-purpose computer designed for a variety of tasks.
Field Programmable Gate Arrays (FPGAs) are slower than microprocessor-based systems due to their technology dependence and the need for software updates.
Field Programmable Gate Arrays (FPGAs) are slower than microprocessor-based systems due to their technology dependence and the need for software updates.
False (B)
What are the key differences between a microprocessor and a microcontroller?
What are the key differences between a microprocessor and a microcontroller?
- A microcontroller is a microprocessor integrated with memory, I/O, and other necessary functionalities on a single chip. (correct)
- Microprocessors are used in embedded systems, while microcontrollers are used in general-purpose computers.
- There is no significant difference; the terms are interchangeable.
- A microprocessor includes memory and I/O, while a microcontroller only performs instructions.
What is the primary characteristic of Random Access Memory (RAM) regarding access time?
What is the primary characteristic of Random Access Memory (RAM) regarding access time?
Dynamic Random Access Memory (DRAM) does not require periodic refresh to maintain its contents.
Dynamic Random Access Memory (DRAM) does not require periodic refresh to maintain its contents.
In the context of memory organization, what is the key feature of Synchronous DRAM (SDRAM)?
In the context of memory organization, what is the key feature of Synchronous DRAM (SDRAM)?
What is the primary difference between Erasable Programmable ROM (EPROM) and Electrically Erasable Programmable ROM (EEPROM)?
What is the primary difference between Erasable Programmable ROM (EPROM) and Electrically Erasable Programmable ROM (EEPROM)?
While many microcontroller vendors use the same processor as their CPU, the memory system, memory map, peripherals, and operation characteristics are identical across different products.
While many microcontroller vendors use the same processor as their CPU, the memory system, memory map, peripherals, and operation characteristics are identical across different products.
What does the term 'isolated I/O' refer to in the context of address space usage?
What does the term 'isolated I/O' refer to in the context of address space usage?
In memory management, how does the Little Endian format store data?
In memory management, how does the Little Endian format store data?
In a Von Neumann architecture, data and program instructions must reside in separate memory spaces.
In a Von Neumann architecture, data and program instructions must reside in separate memory spaces.
What is the key advantage of Harvard architecture over Von Neumann architecture?
What is the key advantage of Harvard architecture over Von Neumann architecture?
Which statement accurately describes registers in a processor?
Which statement accurately describes registers in a processor?
What is the primary role of the Instruction Set Architecture (ISA)?
What is the primary role of the Instruction Set Architecture (ISA)?
In the context of instruction set architectures, what is the main goal of the Complex Instruction Set Computer (CISC) approach?
In the context of instruction set architectures, what is the main goal of the Complex Instruction Set Computer (CISC) approach?
Reduced Instruction Set Computing(RISC) architectures typically feature more straightforward instruction sets, thus needing fewer instructions to perform comparable tasks relative to CISC.
Reduced Instruction Set Computing(RISC) architectures typically feature more straightforward instruction sets, thus needing fewer instructions to perform comparable tasks relative to CISC.
What does address space refer to in a computing context?
What does address space refer to in a computing context?
What is a key feature of ARM's Thumb-2 technology?
What is a key feature of ARM's Thumb-2 technology?
What is the Execution Program Status Register (EPSR) primarily used for?
What is the Execution Program Status Register (EPSR) primarily used for?
In ARM architecture, what is the purpose of the CONTROL register?
In ARM architecture, what is the purpose of the CONTROL register?
Which addressing mode involves the data itself being contained within the instruction, requiring no additional memory access cycles?
Which addressing mode involves the data itself being contained within the instruction, requiring no additional memory access cycles?
What is the address used by the instruction, ADR R5, label
?
What is the address used by the instruction, ADR R5, label
?
Explain the key difference between memory-mapped I/O and isolated I/O.
Explain the key difference between memory-mapped I/O and isolated I/O.
What is the fundamental difference in instruction order related to byte order between standard ARM instructions and Thumb 2 instructions?
What is the fundamental difference in instruction order related to byte order between standard ARM instructions and Thumb 2 instructions?
In terms of load and Store instructions which is typically needed given that ARM is a load/store architecture, what instruction set format is used for their descriptions?
In terms of load and Store instructions which is typically needed given that ARM is a load/store architecture, what instruction set format is used for their descriptions?
In assembly language, a mnemonic is used as a representation of a ______ instruction.
In assembly language, a mnemonic is used as a representation of a ______ instruction.
The ______ register controls the stack used and the privilege level for software execution when the processor is in Thread mode.
The ______ register controls the stack used and the privilege level for software execution when the processor is in Thread mode.
Match each memory type with its correct description:
Match each memory type with its correct description:
Match the ARM status registers with their proper usage description:
Match the ARM status registers with their proper usage description:
The .W suffix is used to indicate what bit instructions are to be used for in embedded systems. The .N suffix is not used.
The .W suffix is used to indicate what bit instructions are to be used for in embedded systems. The .N suffix is not used.
In the Cortex-M4 processor, data processing operations are performed directly on memory contents, not just on registers.
In the Cortex-M4 processor, data processing operations are performed directly on memory contents, not just on registers.
In ARM assembly, what is a primary characteristic about if a constant is to be used in an operation within a 32-bit work?
In ARM assembly, what is a primary characteristic about if a constant is to be used in an operation within a 32-bit work?
In an ARM instruction, what is the symbol used and the syntax needed to include comments?
In an ARM instruction, what is the symbol used and the syntax needed to include comments?
In ARM, what is function of the ALIGN directive?
In ARM, what is function of the ALIGN directive?
In a ARM instruction like SUBS R1, #1
, what is this command and what is its functionality?
In a ARM instruction like SUBS R1, #1
, what is this command and what is its functionality?
Flashcards
Embedded System
Embedded System
A special purpose system that performs one or a few dedicated functions, embedded inside an electronic device.
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
A circuitry capable of doing various operations such as ADD, SHIFT, AND, OR on on-chip registers.
Control Unit
Control Unit
Directs the operation of the processor and tells the memory, arithmetic/logic unit, and input/output devices how to respond to a program's instructions.
Registers
Registers
Signup and view all the flashcards
System Bus
System Bus
Signup and view all the flashcards
Microcontroller
Microcontroller
Signup and view all the flashcards
Microprocessor
Microprocessor
Signup and view all the flashcards
Little Endian
Little Endian
Signup and view all the flashcards
Big Endian
Big Endian
Signup and view all the flashcards
Von Neumann architecture
Von Neumann architecture
Signup and view all the flashcards
Harvard architecture
Harvard architecture
Signup and view all the flashcards
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
Signup and view all the flashcards
Complex Instruction Set Architecture (CISC)
Complex Instruction Set Architecture (CISC)
Signup and view all the flashcards
Registers
Registers
Signup and view all the flashcards
Reduced Instruction Set Architecture (RISC)
Reduced Instruction Set Architecture (RISC)
Signup and view all the flashcards
ARM architecture
ARM architecture
Signup and view all the flashcards
ARM processor
ARM processor
Signup and view all the flashcards
Signed
Signed
Signup and view all the flashcards
unsigned
unsigned
Signup and view all the flashcards
Addressing mode
Addressing mode
Signup and view all the flashcards
Immediate addressing mode
Immediate addressing mode
Signup and view all the flashcards
Indexed addressing mode
Indexed addressing mode
Signup and view all the flashcards
PC-relative addressing mode
PC-relative addressing mode
Signup and view all the flashcards
LDR Rd,=val
LDR Rd,=val
Signup and view all the flashcards
Cortex-M4 memory
Cortex-M4 memory
Signup and view all the flashcards
Directive
Directive
Signup and view all the flashcards
AREA directive
AREA directive
Signup and view all the flashcards
ENTRY directive
ENTRY directive
Signup and view all the flashcards
END directive
END directive
Signup and view all the flashcards
PROC and ENDP
PROC and ENDP
Signup and view all the flashcards
EXPORT
EXPORT
Signup and view all the flashcards
IMPORT
IMPORT
Signup and view all the flashcards
Thumb-2
Thumb-2
Signup and view all the flashcards
Thumb-2 Instruction Set Architecture (ISA)
Thumb-2 Instruction Set Architecture (ISA)
Signup and view all the flashcards
Thumb2 instructions are either 16-bit or 32-bit?
Thumb2 instructions are either 16-bit or 32-bit?
Signup and view all the flashcards
Thumb Instruction Set
Thumb Instruction Set
Signup and view all the flashcards
APSR register (Application Program Status Register):
APSR register (Application Program Status Register):
Signup and view all the flashcards
Data Instruction
Data Instruction
Signup and view all the flashcards
Load/store Architecture
Load/store Architecture
Signup and view all the flashcards
Study Notes
Course Objectives
- Understand the operation of microprocessors and microcontrollers
- Learn machine language programming and microprocessor interfacing techniques
- Design and interface microcontroller-based embedded systems in both hardware and software
- Master basic programming of ARM Cortex chips using assembly language
- Learn the fundamentals of embedded system design
- Ultimate goal: Apply this knowledge to more advanced structures.
Embedded Systems
- Special-purpose systems perform dedicated functions
- Computer systems embedded inside electronic devices, but not general-purpose computers
- Characteristics include being dedicated to specific functions, interacting with the environment, and having real-time requirements
- Application examples: microwave oven front panels, Canon EOS 3 camera, digital TV, a smartphone, vehicle control, nuclear power plant control
- Implemented using microcontrollers or digital circuits
- Microcontrollers (or microprocessor-based systems): Slower but software can be updated
- Digital circuits or Field Programmable Gate Arrays (FPGAs): Faster but function changes are difficult
Microcontrollers
- A full computer system on a chip, although resources are limited
- Designed for standalone applications
- Basic components: CPU, temporary memory (registers, cache), main and secondary memory, input/output modules
Microprocessors
- A component performing instructions and tasks for computer processing
- When integrated with memory, I/O, and other functionalities, becomes a microcontroller
- Can be single-core or multi-core
- Multi-core processors have two or more independent cores or processing units
- Arithmetic Logic Unit (ALU): Circuitry capable of performing operations like ADD, SHIFT, AND, OR on on-chip registers
- Control Unit: Directs processor operations and instructs memory, ALU, and I/O devices
- Registers: Small storage within a microprocessor
- System Bus: Connects major computer components, carrying information, addresses, and control signals
I/O Ports
- External devices connected to the microcontroller give functionality to the system
- An input port is hardware on a microcontroller that allows information about the external world to be entered into the computer
- An output port is hardware on the microcontroller to send information out
- Interface Includes I/O ports, external electronics, physical devices, and software
- Classifications of I/O interfaces:
- Parallel: Binary data available at once
- Serial: Binary data sent one bit at a time
- Analog: Data encoded as voltage, current, or power
- Time: Data encoded as period, frequency, pulse width, or phase shift
- I/O ports available on the Tiva C series board: UART, SSI, I2C, Timer, PWM, ADC, Analog comparator, QEI, USB, Ethernet, CAN
Memory
- Random Access Memory (RAM): Equal access time for any location.
- Read/write capable
- Read-Only Memory (ROM): Can only be read.
- Cannot be directly written to by the processor
- Dynamic Random Access Memory (DRAM): Requires periodic refresh to maintain contents
- Static Random Access Memory (SRAM): No periodic refresh
- Predictable and faster than DRAM
- Synchronous DRAM (SDRAM): Synchronous interface requires a clock signal
- Divided into banks for concurrent operations, improving concurrency and data transfer
- Mask-Programmed ROM (MROM): Programmed during manufacturing
- Programmable ROM (PROM): Programmed by the end user
- Erasable Programmable ROM (EPROM): Electrically programmable and erasable using ultraviolet light
- Electrically Erasable Programmable ROM (EEPROM): Electrically programmable and erasable at the location level
- Flash Memory: Electrically programmable and erasable only in bulk blocks
- The Tiva C Series TM4C123G microcontroller has 256KB of flash memory, 32KB of RAM, and 2KB of EEPROM
Developing Embedded Applications
- Embedded system development requires synchronized hardware and software development
- Factors in Microcontroller Selection
- Peripherals and interface features, such as the number of I/O ports and types of serial communication modules
- Memory size requirements
- Processing speed requirements
- Low power requirements
- Performance and maximum frequency
- Chip package
- Operation conditions: voltage, temperature, electromagnetic interference
- Cost and availability
- Software development tool support and kits
- Future upgradability
- Firmware packages and firmware security
- Availability of application notes, design examples, and support
Software Development
- Program Instructions
- Machine Instruction: Binary code executed by the processor
- Assembly Language: Mnemonic representation of machine code instructions
- High-Level Language: English-like syntax, translated by a compiler
- Assembly programs are more optimized
- Microcontrollers have different word sizes, memory types, and architectures.
Address Space
- Memory is a sequence of addressable locations
- A memory location has an address and its contents.
- CPU and memory communicate through address and data buses.
- The address space depends on the processor’s address decoding mechanism
- Different address space usage approaches
- Isolated I/O: Separate spaces for memory and I/O. (Intel)
- Memory-mapped I/O: Single address space for both. (ARM, Motorola)
- The Cortex-M4 processor has 32 bits for addressing, supporting 4GB of memory space
Data Organization
- Memory stores data in fixed-size locations (typically 8-bit bytes), each with a unique address
- Memory content is accessible by size: byte, half word, word, double word
- A 32-bit piece of data has four bytes, depends on endianness
- Little Endian: LSB stored in the lowest address (ARM default)
- Big Endian: LSB stored in the highest address
Memory Architecture
- Two classes
- Von Neumann: Data and program share memory
- Requires a single memory interface bus, but bottlenecks data transfer
- Harvard: Separate buses for code and data to improve performance
- Requires sophisticated hardware to support multiple interface buses
- The Cortex M4 is based on the Harvard architecture
Registers
- They are closely located in the processor
- Fast access, but limited quantity
- General-purpose registers store data (timer values, constants) and addresses (ASCII tables, stack)
- Some are reserved for specific purposes like program counters and program status registers.
Instruction Set Architecture (ISA)
- ISA provides an interface for communication
- Elements in ISA
- Instruction Set:
- Group of instructions to the computer
- Instructions direct computer in terms of data manipulation -Opcode or operational code: Instruction that's applied
- Operand is memory register or data which instruction is applied on
- Addressing Modes: Specifies how data is accessed -Direct mode accesses data in a indirect way -Indirect mode access is straight data
CISC and RISC
- Complex Instruction Set Architecture (CISC) approach minimizes instructions per program, sacrificing cycles per instruction
-Complex hardware design, slower execution.
Reduced Instruction Set Architecture (RISC) decreases the cycles per instruction
- Needs more instructions and memory
- ARM provides the 16-bit Thumb and 16/32-bit Thumb2 instruction sets
Instruction Execution
- Multiple stages in executing an instruction
- Fetching
- Decoding
- Executing
- Cortex M4 uses a 3 stage pipeline
ARM Architecture
- 1980s ARM Acorn computers
- ARM based an RISC developed by Advanced RISC machines
- requires lesser transistors
- smaller size
- low power consumption
- has modular design
- can be grouped by different architectutres, families and cores
Arm Processors
- Various bit widhts, for instance ARMv4T with 32, ARMv5 with 32 etc
- Cortex AX implements Virtual Memory Systems arch based on MMU
- ARM Processor licenses includes ARMv8A, CortexA15
Registers
- Has 32 bit registers
- General purpose registers r0-r12
- Stack Pointer SP
- Link Register
- Program Counter
- Some register can be reached accoringly
Cortex M3/M4 CPU
- Has Flash Memory
- Has IO Code bus with Instuction Fetch
- Has data and debug data
Data Processing
- Data can be handeled efficiently with 8/16 bit
- Support operating systems
- Support memory protection
- Has instructions for system control
Thumb instructions
- 16 bit instruction set, some can access high register
- alligned and half-worded
- Various types, for instance data movement, arithmetic
- APSR 32 bit register holds the flag bits
ALU Support
ALU Supports a barrel shifter that has powerful instruction when shifting
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.