Skip to content

Commit 10f95d0

Browse files
Enhance contents
1 parent 78f7580 commit 10f95d0

13 files changed

+5295
-326
lines changed

Computer_architecture/Floating_Point.md

Lines changed: 589 additions & 0 deletions
Large diffs are not rendered by default.

Computer_architecture/Memory_Hierarchy.md

Lines changed: 438 additions & 0 deletions
Large diffs are not rendered by default.

Computer_architecture/Memory_Ordering.md

Lines changed: 537 additions & 0 deletions
Large diffs are not rendered by default.

Computer_architecture/Multi_core_Systems.md

Lines changed: 735 additions & 0 deletions
Large diffs are not rendered by default.

Computer_architecture/Performance_Counters.md

Lines changed: 686 additions & 0 deletions
Large diffs are not rendered by default.

Computer_architecture/Pipeline_Architecture.md

Lines changed: 710 additions & 0 deletions
Large diffs are not rendered by default.

Computer_architecture/Vector_Processing.md

Lines changed: 553 additions & 0 deletions
Large diffs are not rendered by default.

Hardware_Fundamentals/Analog_IO.md

Lines changed: 427 additions & 255 deletions
Large diffs are not rendered by default.

Hardware_Fundamentals/Clock_Management.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# ⏰ Clock Management
22

3+
## Quick Reference: Key Facts
4+
5+
- **Clock Management** is fundamental to embedded system design, affecting performance, power consumption, and reliability
6+
- **Clock Sources** include internal oscillators (HSI, MSI, LSI) and external crystals (HSE, LSE) with different stability characteristics
7+
- **PLL Configuration** multiplies input frequencies to generate higher system clocks while maintaining phase relationships
8+
- **Clock Distribution** routes system clocks to various peripherals with different frequency requirements and timing constraints
9+
- **Frequency Management** involves dynamic scaling, clock gating, and optimization for power vs. performance trade-offs
10+
- **Clock Stability** is critical for communication protocols, timing-sensitive applications, and system reliability
11+
- **Jitter and Phase Noise** affect signal integrity, especially in high-speed communication and precision timing applications
12+
- **Clock Tree Validation** ensures all derived frequencies are within acceptable ranges and meet peripheral requirements
13+
314
> **System Clock Configuration, PLL Setup, and Frequency Management**
415
> Learn to configure system clocks, PLLs, and manage frequencies for optimal performance
516
@@ -42,6 +53,120 @@ void clocks_init(void){ /* enable HSE, configure PLLM/N/P/Q; switch SYSCLK */ }
4253
4354
---
4455
56+
## 🔍 Visual Understanding
57+
58+
### **Clock Tree Architecture**
59+
```
60+
System Clock Tree
61+
┌─────────────────────────────────────────────────────────────┐
62+
│ Primary Clock Sources │
63+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
64+
│ │ HSE │ │ HSI │ │ MSI │ │
65+
│ │ (External │ │ (Internal │ │ (Multi- │ │
66+
│ │ Crystal) │ │ RC Osc) │ │ Speed RC) │ │
67+
│ └─────────────┘ └─────────────┘ └─────────────┘ │
68+
│ │ │ │ │
69+
│ ▼ ▼ ▼ │
70+
│ ┌─────────────────────────────────────────────────────┐ │
71+
│ │ PLL Configuration │ │
72+
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
73+
│ │ │ PLL M │ │ PLL N │ │ PLL P │ │ │
74+
│ │ │ (Divider) │ │(Multiplier) │ │ (Divider) │ │ │
75+
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
76+
│ └─────────────────────────────────────────────────────┘ │
77+
│ │ │
78+
│ ▼ │
79+
│ ┌─────────────────────────────────────────────────────┐ │
80+
│ │ System Clock (SYSCLK) │ │
81+
│ └─────────────────────────────────────────────────────┘ │
82+
│ │ │
83+
│ ▼ │
84+
│ ┌─────────────────────────────────────────────────────┐ │
85+
│ │ Peripheral Clock Distribution │ │
86+
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
87+
│ │ │ AHB Bus │ │ APB1 Bus │ │ APB2 Bus │ │ │
88+
│ │ │ (High Speed)│ │ (Low Speed) │ │(High Speed) │ │ │
89+
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
90+
└─────────────────────────────────────────────────────────────┘
91+
```
92+
93+
### **PLL Frequency Multiplication**
94+
```
95+
PLL Frequency Generation
96+
Input Frequency (f_in)
97+
^
98+
│ ┌─────────────────┐
99+
│ │ │
100+
│ │ │
101+
│ │ │
102+
+──────────────────────────-> Time
103+
104+
PLL Output (f_out = f_in × N/M)
105+
^
106+
│ ┌─────────────────┐
107+
│ │ │
108+
│ │ │
109+
│ │ │
110+
+──────────────────────────-> Time
111+
│<->│ Higher Frequency
112+
113+
Phase Relationship
114+
^
115+
│ ┌─────────────────┐
116+
│ │ │
117+
│ │ │
118+
│ │ │
119+
+──────────────────────────-> Time
120+
│<->│ Phase Locked
121+
```
122+
123+
### **Clock Gating and Power Management**
124+
```
125+
Clock Gating for Power Optimization
126+
┌─────────────────────────────────────────────────────────────┐
127+
│ Clock Gating Control │
128+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
129+
│ │ Module 1 │ │ Module 2 │ │ Module 3 │ │
130+
│ │ Clock Gate │ │ Clock Gate │ │ Clock Gate │ │
131+
│ │ [ON] │ │ [OFF] │ │ [ON] │ │
132+
│ └─────────────┘ └─────────────┘ └─────────────┘ │
133+
│ │ │ │ │
134+
│ ▼ ▼ ▼ │
135+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
136+
│ │ Active │ │ Inactive │ │ Active │ │
137+
│ │ (Consuming │ │ (No Power │ │ (Consuming │ │
138+
│ │ Power) │ │ Draw) │ │ Power) │ │
139+
│ └─────────────┘ └─────────────┘ └─────────────┘ │
140+
└─────────────────────────────────────────────────────────────┘
141+
```
142+
143+
### **🧠 Conceptual Foundation**
144+
145+
#### **The Role of Clocks in Embedded Systems**
146+
Clocks serve as the heartbeat of embedded systems, synchronizing all operations and determining system performance. Understanding clock management is essential for designing reliable, efficient, and high-performance systems.
147+
148+
**Key Characteristics:**
149+
- **Synchronization**: Clocks coordinate all system operations and data transfers
150+
- **Performance**: Higher clock frequencies enable faster processing and communication
151+
- **Power Efficiency**: Dynamic frequency scaling and clock gating optimize power consumption
152+
- **Reliability**: Stable clocks ensure consistent system behavior and timing accuracy
153+
154+
#### **Why Clock Management Matters**
155+
Proper clock management is critical for system success:
156+
157+
- **System Performance**: Clock frequency directly affects processing speed and throughput
158+
- **Power Consumption**: Higher frequencies consume more power; dynamic scaling optimizes efficiency
159+
- **Communication Reliability**: Accurate clocks are essential for UART, SPI, I2C, and other protocols
160+
- **Timing Precision**: PWM, ADC sampling, and real-time applications depend on stable timing
161+
162+
#### **The Clock Design Challenge**
163+
Clock system design involves balancing multiple competing requirements:
164+
165+
- **Frequency Requirements**: Different peripherals need different clock frequencies
166+
- **Stability vs. Cost**: External crystals provide better stability but increase cost
167+
- **Power vs. Performance**: Higher frequencies improve performance but increase power consumption
168+
- **Jitter and Noise**: Clock quality affects signal integrity and system reliability
169+
45170
## 🧪 Guided Labs
46171
1) Clock tree documentation
47172
- Map out your MCU's clock tree; measure actual frequencies at different points.

Hardware_Fundamentals/Digital_IO_Programming.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# 🔌 Digital I/O Programming
22

3+
## Quick Reference: Key Facts
4+
5+
- **Digital I/O Programming** involves controlling binary signals (HIGH/LOW) through GPIO pins for embedded system interaction
6+
- **Input Operations** include reading switches, sensors, and digital signals with debouncing and edge detection
7+
- **Output Operations** include driving LEDs, relays, displays, and actuators with precise timing control
8+
- **Debouncing** is essential for reliable switch reading, using hardware filters or software algorithms
9+
- **Edge Detection** identifies state transitions (rising/falling) for event-driven applications
10+
- **State Machines** manage complex I/O sequences and user interface interactions
11+
- **Performance Optimization** includes atomic operations, interrupt handling, and timing consistency
12+
- **Interface Design** covers keypads, displays, and multiplexing techniques for efficient I/O
13+
314
> **Mastering Digital Input/Output Operations for Embedded Systems**
415
> Reading switches, driving LEDs, keypad scanning, and digital signal processing
516
@@ -56,6 +67,100 @@ static inline void led_toggle(void){ /* XOR ODR bit */ }
5667
5768
---
5869
70+
## 🔍 Visual Understanding
71+
72+
### **Digital I/O Signal Characteristics**
73+
```
74+
Digital Signal States
75+
┌─────────────────────────────────────────────────────────────┐
76+
│ HIGH State (Logic 1) │
77+
│ ┌─────────────────────────────────────────────────────┐ │
78+
│ │ Voltage: 3.3V/5V (depending on logic level) │ │
79+
│ │ Current: Can source current to external loads │ │
80+
│ │ State: Active/ON/True │ │
81+
│ └─────────────────────────────────────────────────────┘ │
82+
├─────────────────────────────────────────────────────────────┤
83+
│ LOW State (Logic 0) │
84+
│ ┌─────────────────────────────────────────────────────┐ │
85+
│ │ Voltage: 0V (ground reference) │ │
86+
│ │ Current: Can sink current from external sources │ │
87+
│ │ State: Inactive/OFF/False │ │
88+
│ └─────────────────────────────────────────────────────┘ │
89+
└─────────────────────────────────────────────────────────────┘
90+
```
91+
92+
### **Switch Debouncing Process**
93+
```
94+
Switch Bounce and Debouncing
95+
Raw Switch Signal
96+
^
97+
| ┌─┐ ┌─┐ ┌─┐ ┌─┐ ┌─┐
98+
| │ │ │ │ │ │ │ │ │ │
99+
| │ │ │ │ │ │ │ │ │ │
100+
| │ │ │ │ │ │ │ │ │ │
101+
+──────────────────────────-> Time
102+
|<->| Bounce Period
103+
104+
Debounced Signal
105+
^
106+
| ┌─────────────────┐
107+
| │ │
108+
| │ │
109+
| │ │
110+
+──────────────────────────-> Time
111+
|<->| Stable Period
112+
```
113+
114+
### **Edge Detection Timing**
115+
```
116+
Edge Detection and Timing
117+
Input Signal
118+
^
119+
| ┌─────────────────┐
120+
| │ │
121+
| │ │
122+
| │ │
123+
+──────────────────────────-> Time
124+
▲ ▼
125+
Rising Falling
126+
Edge Edge
127+
128+
Interrupt Response
129+
^
130+
| │ │
131+
| │ │
132+
| │ │
133+
+──────────────────────────-> Time
134+
│<->│ Response Time
135+
```
136+
137+
### **🧠 Conceptual Foundation**
138+
139+
#### **The Digital I/O Paradigm**
140+
Digital I/O represents the most fundamental level of embedded system interaction. Unlike analog I/O which deals with continuous values, digital I/O operates on discrete binary states that are inherently noise-resistant and fast.
141+
142+
**Key Characteristics:**
143+
- **Binary Nature**: Only two states simplify logic and reduce errors
144+
- **Noise Immunity**: High noise margins make signals reliable
145+
- **Fast Response**: Immediate state changes enable real-time control
146+
- **Deterministic**: Predictable timing and behavior
147+
148+
#### **Why Digital I/O Programming Matters**
149+
Digital I/O programming is critical for system reliability and performance:
150+
151+
- **Signal Integrity**: Proper timing and debouncing ensure reliable operation
152+
- **Real-time Response**: Fast, predictable response to external events
153+
- **Resource Management**: Efficient use of limited GPIO pins
154+
- **System Reliability**: Robust operation in noisy environments
155+
156+
#### **The Timing Challenge**
157+
Digital I/O introduces unique timing challenges that must be addressed:
158+
159+
- **Debouncing**: Mechanical switches generate multiple transitions that must be filtered
160+
- **Edge Detection**: Precise timing is required for event-driven applications
161+
- **Interrupt Latency**: Response time must be predictable and bounded
162+
- **Jitter Control**: Timing variations can affect system performance
163+
59164
## 🧪 Guided Labs
60165
1) Jitter measurement
61166
- Toggle a pin in a tight loop; measure edge-to-edge timing with an oscilloscope or logic analyzer.

0 commit comments

Comments
 (0)