Lab 5: System Initialization
TMS320F2837xD Microcontroller Workshop - System Initialization 5 - 23
Lab 5: System Initialization
Objective
The objective of this lab exercise is to perform the processor system initialization. Additionally,
the peripheral interrupt expansion (PIE) vectors will be initialized and tested using the information
discussed in the previous module. This initialization process will be used again in all of the lab
exercises throughout this workshop. The system initialization for this lab will consist of the
following:
• Setup the clock module – PLL, LOSPCP = /4, low-power modes to default values, enable all
module clocks
• Disable the watchdog – clear WD flag, disable watchdog, WD prescale = 1
• Setup the watchdog and system control registers – DO NOT clear WD OVERRIDE bit,
configure WD to generate a CPU reset
• Setup the shared I/O pins – set all GPIO pins to GPIO function (e.g. a "0” setting for GPIO
group multiplexer “GPxGMUX1/2” and a “0” setting for GPIO multiplexer “GPxMUX1/2”)
The first part of the lab exercise will setup the system initialization and test the watchdog
operation by having the watchdog cause a reset. In the second part of the lab exercise the PIE
vectors will be added and tested by using the watchdog to generate an interrupt. This lab will
make use of the F2837xD C-code header files to simplify the programming of the device, as well
as take care of the register definitions and addresses. Please review these files, and make use
of them in the future, as needed.
Procedure
Create a New Project
1. Create a new project (File New CCS Project) for this lab exercise. The top
section should default to the options previously selected (setting the “Target” to
“TMS320F28379D”, and leaving the “Connection” box blank). Name the project Lab5.
Uncheck the “Use default location” box. Using the “Browse…” button navigate to:
C:\C28x\Labs\Lab5\cpu01 then click OK. Set the “Linker Command File” to <none>,
and be sure to set the “Project templetes and examples” to “Empty Project”. Then click
Finish.
2. Right-click on Lab5 in the Project Explorer window and add (copy) the following files to
the project (Add Files…) from C:\C28x\Labs\Lab5\source:
F2837xD_GlobalVariableDefs.c
F2837xD_Headers_nonBIOS_cpu1.cmd
Do not add DefaultIsr_5.c, PieCtrl.c, and PieVect.c. These files will be added
and used with the interrupts in the second part of this lab exercise.