0% found this document useful (0 votes)
62 views27 pages

Embedded Systems Cortexm0-Uart: SV:DR - Emad Hamadeh

Uploaded by

yuosef hababa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views27 pages

Embedded Systems Cortexm0-Uart: SV:DR - Emad Hamadeh

Uploaded by

yuosef hababa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Embedded Systems

CortexM0-UART

Faze Clan
SV:Dr.Emad Hamadeh
Introduction:-
Processors are used in majority of electronic products In
most cases, these processors are placed inside in chips
called microcontrollers.
There are many different types of microcontrollers they can
be available with different processors, memory sizes, and
peripherals inside, and can be available in different
packages
Cortex-M0:

The Cortex™-M0 processor is an entry-level 32-bit


ARM Cortex processor designed for a broad range
of embedded applications. It offers significant
benefits to developers, including:

 Simple, easy-to-use programmers model


 Highly efficient ultra-low power
 Excellent code density
 Deterministic, high-performance interrupt
handling
Cortex-M0 Implementation
Cortex-M0 Registers
Memory
Memory Map
Serial communication
Serial communication
Serial communication
UART

 UART – Universal Asynchronous Receiver/Transmitter.

the Asynchronous type of transmitter generates the data


clock internally. There is no incoming serial clock signal,
so in order to achieve proper communication between the
two ends, both of them must be using the same baud rate

The baud rate is the rate at which bits are being


sent bps (bits per second).
Modes Of UART Communication 

The communication over the UART bus can be


configured (set) to be on one of the following
modes:

 Simplex – One direction only, a transmitter to a


receiver.
 Half Duplex – Devices take turns transmitting and
receiving
 Full Duplex – Devices can send and receive
simultaneously (at the same time)
Operation For UART Devices

 The UART serial communication bus can only have 2


devices communicating with each other in one of the 3
modes shown in the previous sub-section.
Structure of UART Data= Packet

 START BIT
 STOP BITS
 DATA FRAME
 PARITY
Baud Rate
 
 Number of symbols sent every second, where every symbol can
represent more than one bit.
 Ex. high-speed modems which use phase shifts to make every data
transition period represent more than one bit.
 For the Teensy LC UART, each symbol represents one bit.
So, we can consider bit rate(bps) and baud rate the same thing.
 standard baud rates include: 1200, 2400, 4800, 9600, 19200, 38400,
57600 and 115200.
Problem
 Assume we have a file with size 1 million bits. Assume we use
9600bps: 8-1-1 (includes STOP and SATRT bits). How long does it
take to transmit the file? Calculate the Overhead %.
– 8-1-1 each frame has 10 bits
– Baud rate is 9600 bits/sec--> Frame rate = 9600/10=960 Frames/sec
or 1.04 msec/frame
– Number of frames generated:
1,000,000 bits x 1 frame/8 bit= 125,000 frames
– Time to transmit 125,000 frames = 125000 frame x 1.046msec/frame
= 130 sec
– Overhead % = control bits / Total Data =2/10 = 20%
Baud Rate Register

 This holds the divisor that divides th peripheral clock to


get the baud rate.
 It is broken to a 12-bit integer part and a 4-bit fractional
part.

Where fpClk is the peripheral clock (usually 8 MHz) and


over8 is either 1 or 0 depending on whether you choose
oversampling by 8 (over8 =1) or 16 (over8 = 0 ).
Baud Rate Register
Forexample, if the baud rate we want is 38400 and fpClk = 16 MHz and we do
oversampling by 16 we get:

The integer part in binary as a 12-bit number:


26 = 0000 0001 1010.
The fractional part :
0.0417 = 0x0.5 + 0x0.25 + 0x0.125 + 0x 0.0625 + 1x0.03125 … = 0.00001 =
0000

The16-bit Baud Rate Divisor is therefore:


0000 00010 1010 0000
Transmitting 0x32 and 0x3C
Handshaking
UART
Advantages Disadvantages

 The data frame is limited by


 Full duplex transmission of data can
size.
be achieved with only two wires.
 Datatransfer speed is low in
 Clock or timing signals are not comparison with parallel
required. communication.
 Integrated error checking is ensured  Appropriate rules must be
using parity bits. agreed upon by both parties
in communication.
 It doesn’t support several
slave or master systems.
UART USART

It can support multiple protocols like


Standalone Communication Protocol
LIN, RS-485, IrDA, etc

Commonly used for low-speed More suitable for high-speed


applications applications

The data rate is relatively low The data rate is much higher

The clock is generated locally and both The clock signal is generated by the
devices are configured to run at the transmitter and sent to the receiver
same baud rate during data transmission

The baud rate of the receiver module The baud rate is useless as the
must be known prior to any receiver module will be using the clock
communication coming from the transmitter device

Offer reduced low energy footprint Operates at high energy consumption


even in sleep mode modes
Faze Clan

SV:Dr.Emad Hamadeh

You might also like