Welcome To The F2833x - Tutorial: Module 1: Introduction
Welcome To The F2833x - Tutorial: Module 1: Introduction
Module 1: Introduction
1-1
Module Topics
CD – ROM Structure
Chapter 1: Introduction to Microprocessor, MCU and DSP
Chapter 2: TMS320F28335 Architecture
Chapter 3: Software Development Tools
Chapter 4: Fixed Point, Floating Point or both?
Chapter 5: Digital Input/Output
Chapter 6: Understanding the F28335 Interrupt System
Chapter 7: Control Actuators and Power Electronics
Chapter 8: Sensor Interface - Analogue to Digital Converter
Chapter 9: Communication I: Serial Communication Interface
Chapter 10: Communication II: Serial Peripheral Interface
Chapter 11: Communication III: Controller Area Network -
CAN
Chapter 12: Communication IV: Inter Integrated Circuit®
Chapter 13: Communication V: Multi Channel Buffered
SerialPort - McBSP
Chapter 14: Internal FLASH Memory and stand alone control
Chapter 15: Boot – loader and Field update
Chapter 16: FLASH – Application Program Interface (API)
Chapter 17: IQ-Math and floating point hardware
Chapter 18: Digital Motor Control
Chapter 19: Digital Power Supply
3. Connect the Peripheral Explorer Board with an USB cable to your PC and
switch the main power switch (SW1) to the right hand side (USB powered). For
more details please refer to the “Quick Start Guide” (sprugm2.pdf”), which can
be found at the teaching CD-ROM (folder C2833x_CCS3 / hardware).
4. Start CCS3.3. Next, perform command “Debug Connect” followed by a
“Debug Reset CPU”. This will bring up the following disassembly window:
Now you have an active connection to the target. If you hit key F10 (“single
step over”) the green arrow should move to the next line.
5. Install the Peripheral Register Header File support package. All laboratory
exercises expect to find the Header File package version 1.31 (sprc530.zip)
installed in folder “C:\tidcs\c28\DSP2833x\v131”. If it is not yet installed, you
can find the zip-file at the teaching CD-ROM under “C2833x_CCS3/libraries”.
6. For IQ-Math based exercises you have to install the IQ-Math library
(sprc087.zip). The default location is “C:\tidcs\c28\IQmath\v15a”. If this library
is not yet installed, you can find the zip-file at the teaching CD-ROM under
“C2833x_CCS3/libraries”.
For the most important peripheral unit, the Pulse Width Modulation Unit (PWM), the
teaching CD-ROM provides a dedicated chapter (Module 7A), which describes the
laboratory procedures and provides the laboratory templates and solutions for more than 10
exercises. These documents can be found in folder “C2833x_CCS3/Modules/Module7” of
the teaching CD-ROM (files “Module_07_A.pdf”and “Solution_07_A.zip”).
For other peripheral units of the F28027, you can easily start with the F28335 examples of
this CD-ROM. Just modify the source code of the F28335 examples and you can run the
examples also with a F28027. Of course, the USB-stick does not have all the additional
external devices of the Peripheral Explorer Board, which must be added manually to the
USB stick. For convenience, the corresponding Header File support package (sprc832.zip)
for the F28027 is also part of the teaching CD-ROM, as well as some additional support files
(sprc835.zip). Both files can be found in folder “C2833x_CCS3/libraries” of the teaching
CD-ROM.
Lab6: “Core Timer 0 and Interrupts” - add a hardware timer to Lab5_1 and use an
interrupt service routine (hardware time base
framework)
Lab 14_1: “Standalone FLASH” - change Lab6 to run directly from FLASH after
power ON.
Lab 15_1: “SCI - Boot loader - download control code before start
Lab16_1: “FLASH – API” - update FLASH while the control code is running
1. what is a microprocessor?
microprocessor (µP, mp):
– Central Device of a multi chip Micro Computer System
– Two basic architectures:
» “von Neumann”- Architecture
» “Harvard” – Architecture
– “Harvard” – Architecture:
» Two independent memory spaces for code and data
» Two memory bus systems for code and data
1-2
Microprocessors are based on a simple sequential procedural approach: Read next machine
code instruction from code memory, decode instruction, read optional operands from data
memory, execute instruction and write back result. This series of events runs in an endless
manner. To use a µP one has to add memory and additional external devices to the
Microprocessor.
code
memory
Control Unit
process
process
Central
input output –
Processing Unit
module CPU module
Microprocessor
data
memory
1-3
A typical microprocessor block diagram is shown above. As can be seen from slide 1-3, the
microprocessor consists of two parts – the control unit and the central processing unit (CPU).
It operates on input signals, reads operands from data memory, writes results back in data
memory, and updates output modules. All computing is based on machine code instructions,
which are sequentially stored in code memory. The microprocessor reads these instructions
one after each other into its control logic.
The execution flow of a piece of machine code instructions follows a certain sequence,
shown in the following slide. Life of a micro processor is quite boring; it never goes off the
beaten track unless it loses its power supply. The sequence is always:
1. Address the next entry in code memory
2. Read (or “fetch”) the next machine instruction from this very address
3. Look, what’s up (“decode” that instruction and prepare next activities)
4. Select one of five next steps:
• Read an input and compute it
• Read an entry from data memory and compute it
• Do an internal operation, which does not require an information exchange
• Write a result back in data memory
• Update an output channel with a result of a previous computation
Note: Some processors are able to perform more than 1 step in parallel.
5. Calculate the next code memory address and return to step #1.
1-4
The heart of a micro processor is its Central Processing Unit (CPU). To keep it simple, we
just look at a very basic structure of a CPU. Today a microprocessor is really one of the most
complex integrated circuits.
CPU of a microprocessor
CPU = Central Processing Unit
• Consists of:
– few internal memory cells (“Register”) for operands
– calculation unit: “Arithmetic Logic Unit” (ALU)
– instruction register (IR) and instruction decoder
– address unit
• Address unit:
– read data and instruction from memory
– write data into memory
• Instruction decoder:
– analyses current instruction and controls subsequent actions of
other modules
• Register:
– store data for instantaneous instruction and computation
1-5
1 - 10 DSP2833x - Introduction
What is a Digital Signal Controller?
• a ALU is able to process two binary values with equal length (N)
N-Bit ALU with N = 4,8,16,32 or 64
• most ALU’s process Fixed Point Numbers
• A few ALU’s, used especially in Digital Signal Processors and
desktop processors, are capable to operate on Floating Point
Numbers or on both formats.
1-6
An ALU performs the arithmetic and logic operations that the microprocessor is capable of.
A minimal requirement for an ALU is to perform ADD, NEG and AND. Other operations
shown in the slide above, improve the performance of a specific microprocessor. A virtual
ALU could look like this:
A, B, Y: Internal register
F: Functional code
C: Carry – Bit
N: Negative – Bit
Z: Zero - Bit
1-7
DSP2833x - Introduction 1 - 11
What is a Digital Signal Controller?
control/
status
- Memory Manager - Bus Control
- logical / physical - Address & Data Bus – data
address Interface
- Instruction Queue
1-8
The Intel 8086 can be considered to be the veteran of all 16-bit microprocessors. Inside this
processor four units take care of the sequence of states. The bus-unit is responsible for
addressing the external memory resources using a group of unidirectional digital address
signals, bi-directional data lines and control and status signals. Its purpose is to fill a first
pipeline, called the “instruction queue” with the next machine instructions to be processed. It
is controlled by the Execution unit and the Address-Unit.
The Instruction unit reads the next instruction out of the Instruction queue decodes it and fills
a second queue, the “Operation queue” with the next internal operations that must be
performed by the Execution Unit.
The Execution Unit does the ‘real’ work; it executes operations or calls the Bus Unit to read
an optional operand from memory.
Once an instruction is completed, the Execution Unit forces the Address Unit to generate the
address of the next instruction. If this instruction was already loaded into the Instruction
queue, the operational speed is increased. This principle is called a “cache”.
We could go much deeper into the secrets of a Microprocessor; eventually you can book
another class at your university that deals with this subject much more in detail, especially
into the pros and cons of Harvard versus Von-Neumann Machines, into RISC versus CISC,
versions of memory accesses etc.
For now, let us just keep in mind the basic operation of this type of device.
1 - 12 DSP2833x - Introduction
What is a Digital Signal Controller?
2. our Desktop – PC is a?
2. Microcomputer
– Microcomputer = microprocessor (µP) + memory +
peripherals
– Example: your Desktop -PC
1-9
DSP2833x - Introduction 1 - 13
What is a Digital Signal Controller?
Microcomputer Peripherals
The following slide (Slide 1-10) is a non-exclusive list of some of the peripheral functions of
a microcomputer. Peripherals are the interface of a microcomputer to the “real world”.
These units allow a microcomputer to communicate with sensors, actuators and to exchange
data and information with other nodes through network interface units.
microcomputer - peripherals
• Peripherals include:
1 - 10
Modern microcomputers are equipped with a lot of enhanced peripheral units. To keep it
simple, let us focus on basic peripheral unite here. If you are more familiar with
microcomputers and you like to work with such hardware units you can easily inspect all
those facinating peripheral units of a state of the art microcomputer.
1 - 14 DSP2833x - Introduction
What is a Digital Signal Controller?
3. System on Chip
1 - 11
DSP2833x - Introduction 1 - 15
What is a Digital Signal Controller?
There are hundreds of types of micro controllers in the highly competitive market of
embedded systems. They all have their pro and cons. Depending on the application area,
budget limitations and on project requirements one has to decide, which one is the best suited
one. The slide above shows a block diagram of one of the most power effective micro
controllers in the market – the MSP430. It comes with integrated memory blocks – FLASH
for non - volatile storage of code sequences and RAM to store variables and results. It is
equipped with internal analog and digital peripherals, communication channels.
The MSP430 family contains much more enhanced versions as shown in the block diagram
at Slide 1-12. Some members of this family have integrated LCD display drivers, hardware
multipliers or direct memory access (DMA) units, just to name a few. If you are more
interested in that family, please use the corresponding Texas Instruments Teaching CD-ROM
for that family.
1 - 16 DSP2833x - Introduction
What is a Digital Signal Controller?
1 - 13
Algorithm Equation
Convolution
1 - 14
DSP2833x - Introduction 1 - 17
What is a Digital Signal Controller?
1 - 18 DSP2833x - Introduction
What is a Digital Signal Controller?
If we look a little bit more in detail into the tasks that needs to be solved by a standard
processor we can distinguish 10 steps. Due to the sequential nature of this type of processor,
it can do only one of the 10 steps at one time. This will consume a considerable amount of
computing power of this processor. For our tiny example, the processor must loop between
step 3 and step 10 a total of four times. For real Digital Signal Processing the SOP –
procedure is going to much higher loop repetitions – forcing the standard processor to spend
even more computing power.
1 - 16
Note: The C-Compiler was used in basic setup mode using optimization level zero.
1 - 17
DSP2833x - Introduction 1 - 19
What is a Digital Signal Controller?
int data[4]={1,2,3,4};
int coeff[4]={8,6,4,2};
int main(void)
{
int i;
int result =0;
for (i=0;i<4;i++)
result += data[i]*coeff[i];
printf("%i",result);
return 0;
}
1 - 18
1 - 19
1 - 20 DSP2833x - Introduction
What is a Digital Signal Controller?
1 - 20
Note: Some manufacturers, like Infineon and Renesas, still call their DSCs
microcontrollers. This is because most target applications are typically regarded as
‘microcontroller sockets’ and many engineers are unfamiliar with the term DSC.
TI also recently changed the naming of the C2000 line from DSC to microcontroller.”
DSP2833x - Introduction 1 - 21
DSP Competition
DSP Competition
There are only a few global players in the area of DSP and DSC. As you can see from the
next slide (for more details, go to: www.fwdconcepts.com ), Texas Instruments is the
absolute leader in this area. A working knowledge of TI-DSP will help you to master your
professional career.
6%
12%
9%
Agere
14% Analog Devices
Freescale
Texas Instruments
Other
59%
1 - 21
With such expertise in DSPs, it is only natural that the lessons TI has learned and
technologies developed for DSPs trickle down also to TI’s microcontrollers. As the leader in
DSP Texas Instruments microcontrollers will also challenge the market!
1 - 22 DSP2833x - Introduction
Texas Instruments DSP/DSC – Portfolio
3,2 2,8
4,6
Wireless
Consumer
9,1 Multipurpose
Computer
Wireline
Automotive
72,3 Relative
Source: www.forwardconcepts.com
1 - 22
Analog I/O, ADC PWM, ADC, USB, ENET, USB, LCD, 1G EMAC, SRIO,
LCD, USB, RF CAN, SPI, I2C ADC, PWM, HMI MMC, EMAC VPSS, USB, DDR2, PCI-66
EMAC, MMC
Measurement, Motor Control, Host Control, Linux/WinCE Linux/Win + Comm, WiMAX,
Sensing, General Digital Power, general purpose, User Apps Video, Imaging, Industrial/
Purpose Lighting motor control Multimedia Medical Imaging
$0.49 to $9.00 $1.50 to $20.00 $2.00 to $8.00 $8.00 to $35.00 $12.00 to $65.00 $4.00 to $99.00+
1 - 23
The DSP / DSC – portfolio of Texas instruments is split into three major device families,
called “Microcontroller, ARM-based and DSP.
The C64x branch is the most powerful series of DSP in computing power. There are floating
– point as well as fixed – point devices in this family. The application fields are image
processing, audio, multimedia server, base stations for wireless communication etc.
DSP2833x - Introduction 1 - 23
Texas Instruments DSP/DSC – Portfolio
The C55x family is focused on mobile systems with very efficient power consumption per
MIPS. Its main application area is cell phone technology.
The C2000 – group is dedicated to Digital Signal Control (DSC), as you have learned from
the first slides and is a very powerful solution for real time control applications. This group
is accompanied at the two ends by a 16-bit Microcontroller group (MSP430) and 32-bit
series of ARM-core based microcontrollers (Cortex M3, Cortex A-8 or ARM9).
The next slide summarizes the main application areas for the 3 Texas Instruments families of
DSP.
1 - 24 DSP2833x - Introduction
TMS320F28x Roadmap
TMS320F28x Roadmap
For the C2000 – family we can distinguish between two groups of devices: a 16-bit group,
called TMS320C24x and a 32-bit group, called TMS320C28x.
1 - 25
The next Slide 1-26 illustrates the latest developments in the 32-bit real-time controller
family C28x:
F2823x
PERFORMANCE
F281x
F280x
Next Gen
F2803x •Performance
•Memory
•Connectivity
Fixed Point F2802x
(100-176 Pins)
• 60 – 150 MHz
Next Gen
• 32 – 512kB Flash
• 3Ph PWM/QEP •60MHz •Low Power
•40-60MHz •Small Package
• 12-bit, 2 SH ADC •Control Law
•16-64kB Flash
(Up to 12.5 MSPS) Accelerator
• CAN, McBSP
•Analog Comp
•32-128kB Flash
• UART, SPI
•CAN, LIN
1 - 26
DSP2833x - Introduction 1 - 25
TMS320F28x Application Areas
Uninterruptable
Power Supplies LED TV
Auto HID Backlighting
Telecom / Server
AC/DC Rectifiers Radar / Collision
Avoidance Medical Oxygen
Laser Ranging Concentrators Optical
Power Line Networking
Hybrid Electric Vehicles
Communication
RFID Readers
DMA 2 QEP
Peripheral Bus
88 GPIO
C28xTM 32-bit DSC 16/32-bit
EMIF
32x32-bit RMW
Multiplier Atomic
ALU SPI
32-bit
Timers (3) 3 SCI
32-bit
Floating- 2 McBSP
Real-Time Point Unit
JTAG I²C
2 CAN
1 - 28
1 - 26 DSP2833x - Introduction