Lab 5: System Initialization
Lab 5: System Initialization
Objective
The objective of this lab is to perform the processor system initialization by applying the
techniques discussed in module 5. 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 the module 6 analog-to-digital converter lab, and the
module 7 event manager lab. The system initialization for this lab will consist of the following:
•
Disable the watchdog – clear WD flag, disable watchdog, WD prescale = 1
•
Setup the clock module – PLL = x5, HISPCP = /1, LOSPCP = /4, low-power modes to
default values, enable all module clocks
•
Setup control register – DO NOT clear WD OVERRIDE bit, WD generate a DSP reset
•
Setup shared I/O pins – set all GPIO pins to GPIO function (e.g. a "0" setting for GPIO
function, and a “1” setting for peripheral function.)
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 DSP281x 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 Project File
Note:
LAB 5
files have been provided as a starting point for the lab and need to be
completed
. DO NOT copy files from a previous lab.
1. Create a new project called
Lab5.pjt
in
C:\C28x\LABS\LAB5
and add the
following files to it:
Main_5.c
Labcfg.cmd
Lab.cdb
DSP281x_Headers_BIOS.cmd
User_5_6_7.cmd
CodeStartBranch.asm
SysCtrl.c
Gpio.c
DSP281x_GlobalVariableDefs.c
Note that include files, such as
DSP281x_Device.h
and
Lab.h,
are automatically
added at project build time.
C28x - System Initialization
5 - 15
Summary of Contents for C28 Series
Page 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Page 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Page 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Page 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Page 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Page 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Page 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Page 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Page 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Page 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...