Manuals
/
Brands
/
Computer Equipment
/
Computer Hardware
/
Motorola
/
Computer Equipment
/
Computer Hardware
Motorola
SC140 manual
1
1
28
28
Download
28 pages, 444.87 Kb
AN2090/D
Rev. 0, 11/2000
Using the SC140 Enhanced OnCE
™
Stopwatch Timer
Application Note
by
Kim-Chyan Gan
and Yuval Ronen
Contents
Main
Page
Abstract and Contents
Page
1Introduction
2SC140 Enhanced OnCE Stopwatch Timer Capabilities
2.1 Features
2.2 Resources
2.3 Implementation
3Setting Up the Stopwatch Timer Within an Application
3.1 Initializing the Stopwatch Timer
3.1.1 Event Detector Control
3.1.2 Address Comparison Setup
3.2 Starting the Stopwatch Timer
3.2.1 Event Counter Control
3.2.2 Counter Registers
3.3 Stopping the Stopwatch Timer
Time ms() EXT 0xffffffffVAL+()
3.4 Converting Cycles to Actual Time
1000 ClockSpeed
-------------------------------- =
3.5 Putting it All Together
modules as desired.
Code 5 depicts the use of the stopwatch timer using the routines that have been described so far.
3.6 Adapting Stopwatch Timer Code to Other SC140 Devices
4Setting Up the Stopwatch Timer Within the Debugger
4.1 Initializing the Stopwatch Timer
4.1.1 Setting Up the Event Detector
Page
4.1.2 Setting Up the Event Counter
4.2 Stopping the Stopwatch Timer
5Setting Up the System Clock Speed
5.1 Setting Up the PLL in Software
5.2 Setting Up the PLL in Hardware
6Verifying Correct Setup
6.1 Using the LED on the SDP
6.1.1 Setting Up EE1
6.1.2 Toggling EE1
6.2 Testing the Stopwatch Timer
16 Using the SC140 Enhanced OnCE Stopwatch Timer
Code 9. Testing Code
7Conclusion
8References
Page
Appendix A
Complete Example of Profiling
Code A-1. EOnCE_stopwatch.h
A-2 Using the SC140 Enhanced OnCE Stopwatch Timer
Code A-2. EOnCE_registers.h
Code A-3. EOnCE_stopwatch.c
A-4 Using the SC140 Enhanced OnCE Stopwatch Timer
Code A-4. autocorr.c