Exercise 1 - Introduction To Embedded Systems
Exercise 1 - Introduction To Embedded Systems
Answer the following questions for the MSP432 processor, as used as an example in the lecture:
(c) Suppose an LED is connected to Pin 5 of Port 2. Determine the memory address of Port 2, and the
value which has to be written to this address to turn the LED on.
Determine the optimal partitioning of SRAM address bits into row select bits, used to select word lines, and
column select bits, used to select bit lines. The objective is to minimize the area of the SRAM. Use the
following data for your computations:
• Area of a 2-to-1 multiplexer: Amux = 4
• Row select bits, to select a word line: u
• Area of a 2-input AND gate: AAND = 1
• Column select bits, to select a bit line: w
• Area of a NOT gate: ANOT = 1
• The address is 8-bit: u + w = 8
• Area of a wire: Awire = 0
• Area of a sense amplifier: Asense = 5
• Area of a memory cell: Amem = 6
It is assumed that the multiplexer is dual channel, meaning a single multiplexer can be used to select both BL
and BL.
Hint: Use recursive construction to build decoders from smaller decoders and 2-input AND gates. Use a
recursive tree-like construction to build large multiplexers from smaller ones. An example of these constructions
is given below.
I0 O0 O0
⇔ I0 decoder(1)
O1 O1
A 1-bit decoder can be constructed using a NOT gate:
A 2-bit decoder can be constructed using two 1-bit decoders and four 2-input AND gates:
1
O0
I0 decoder(1)
O1 O0
⇔ I0 O1
decoder(2)
I1 O2
O2 O3
I1 decoder(1)
O3
I1 I0
S0 multiplexer(1)
S0 multiplexer(1) multiplexer(1)
S1
multiplexer(1)
Task 2: Communication
Suppose that a sender and a receiver exchange data via UART with the following configuration:
• UART is set up with 1 start bit, 2 stop bits, 8 data bits, and 1 parity bit
(d) Suppose that we use division factor as computed in part ((b)). The sender has a basic clock frequency
of 48 MHz. What is the range of clock frequencies of the receiver such that:
• the signal is stable between one period before and one period after the sampling time.
An external event is sensed using polling, with a period P . It takes 100 cycles to process the event. The
processor frequency is 48 MHz. Before starting a new period, the previous polling task should have finished.
The relative deadline for processing an event is 10µs.
(b) Suppose now that an unrelated interrupt may occur, and the interrupt has a higher priority than the
processing of the polling event. Including all overheads, it takes 40 cycles to process the interrupt.
The minimum time between two subsequent interrupts is T . Suppose that T is larger than 140 cycles.
Determine the range of feasible polling periods P .
2
(c) Find the minimum time between two interrupts T , and the corresponding polling period P , such that
the polling period is feasible.