Lab 5: System Initialization
C2000 Microcontroller Workshop - System Initialization 5 - 25
24. Open and inspect PieCtrl.c. This file is used to initialize the PIE RAM and enable
the PIE. The interrupt vector table located in PieVect.c is copied to the PIE RAM to
setup the vectors for the interrupts. Close the modified and inspected files.
Build and Load
25. Click the “Build” button and select Yes to “Reload the program automatically”.
Switch to the “CCS Debug Perspective” view by clicking the CCS Debug icon in the
upper right-hand corner.
Run the Code – Watchdog Interrupt
26. Place the cursor in the “main loop” section, right click the mouse key and select Run
To Line.
27. Run your code. Where did your code stop? Are the results as expected? If things went
as expected, your code should stop at the “ESTOP0” instruction in the WAKEINT ISR.
Terminate Debug Session and Close Project
28. Terminate the active debug session using the Terminate button. This will close the
debugger and return CCS to the “CCS Edit Perspective” view.
29. Next, close the project by right-clicking on Lab5 in the Project Explorer window
and select Close Project.
End of Exercise
Note: By default, the watchdog timer is enabled out of reset. Code in the file
CodeStartBranch.asm has been configured to disable the watchdog. This can be
important for large C code projects (ask your instructor if this has not already been
explained). During this lab exercise, the watchdog was actually re-enabled (or disabled
again) in the file Watchdog.c.