Professional Documents
Culture Documents
L9 - Cso 4
L9 - Cso 4
2022-2023
Lecture 9
Computer Systems Organisation
(CSO) - Part 4
Dr. D. D. Iliescu
School of Engineering, University of Warwick
▪ Baudrate
• Signalling rate measured in symbols per second.
• Multi-level signalling –multiple bits per symbol.
• 2-level signalling –each symbol represents a bit.
• For 2-level signalling at 9600 baudrate with a start and stop bit for every 8
bits data, Data Rate = bits transferred per second (b/s):
= 9600 * (8 bits / 10 symbols) =7680 bits/second
Character sent per second = 7680 / 8 = 960 characters/second
© 2022-2023 ES2C4 Lecture 9 - Computer Systems Organisation (CSO) - Part 4 8 of 24
1. Serial I/O
1.3. Universal Asynchronous Receiver/Transmitter (UART)(cont.)
▪ UART transmission:
• Lines are at logic ‘1’ when not in use.
• Each character is sent as:
- Start bit (logic ‘0’)
- 7 or 8 data bits
- parity bit (optional)
- One or more stop bits (logic ‘1’).
• Parity bit
- Used to detect if transmission was corrupt.
- Configured as even or odd.
- Even parity –chosen so that total collection of data and parity has an even number of
‘1’s. Receiver checks if even number of 1’s was received and signals an error if not.
- Odd parity is the reverse.
https://learn.sparkfun.com/tutorials/i2c/all
© 2022-2023 ES2C4 Lecture 9 - Computer Systems Organisation (CSO) - Part 4 10 of 24
1. Serial I/O
1.4. Inter-Integrated Circuit (I2C) (cont.)
https://learn.sparkfun.com/tutorials/i2c/all
© 2022-2023 ES2C4 Lecture 9 - Computer Systems Organisation (CSO) - Part 4 11 of 24
1. Serial I/O
1.5. High Speed Serial Interfaces
▪ Interface Encoded data containing both data and clocking information is sent
in a single differential signal.
• Speeds up to 60 GB/s
▪ Examples include:
• PCIe
• HDMI
• SATA
• USB 3.1
• DisplayPort
▪ 32-bit micro-
controller unit
STM32L342KC MCU
chip
Organisation of
STM32L342KC MCU
https://deepbluembedded.com/getting-started-with-stm32-arm-cortex-mcus/
© 2022-2023 ES2C4 Lecture 9 - Computer Systems Organisation (CSO) - Part 4 14 of 24
2. Timers, PMW and Interrupts
2.1. Timers
▪ Prescaling
• The prescaler is used to divide the clock feeding the timer.
• Therefore the timer frequency is:
- System clock speed / Prescaler
• The prescaler value is stored in the prescaler register.
▪ Auto Reload Register (ARR)
• Further divides the system clock to give the timer frequency.
• Therefore the timer frequency is:
- System clock speed / (Prescaler x ARR)
• Counter counts up to value in ARR (then resets) before being reloaded.
▪ Classes of Interrupts
• Program: Generated by some condition that occurs as a result of an instruction execution,
such as arithmetic overflow, division by zero, attempt to execute an illegal machine
instruction, or reference outside a user’s allowed memory space.
• Timer: Generated by a timer within the processor. This allows the operating system to
perform certain functions on a regular basis.
• I/O: Generated by an I/O controller, to signal normal completion of an operation, request
service from the processor, or to signal a variety of error conditions.
• Hardware Failure: Generated by a failure such as power failure or memory parity error.