AN2090/DRev. 0, 11/2000Using the SC140 Enhanced OnCE™Stopwatch TimerApplication Note by Kim-Chyan Gan and Yuval Ronen
6 Using the SC140 Enhanced OnCE Stopwatch Timer 3.2.2 Counter RegistersECNT_VAL is a countdown counter, and ECNT_EXT is a countup counter. ECNT_VAL
Setting Up the Stopwatch Timer Within an Application 7Code 4. C Code for Clock-Cycle-to-Time Conversiontypedef enum { EONCE_SECOND, EONCE_MILLISEC
8 Using the SC140 Enhanced OnCE Stopwatch Timer 3.6 Adapting Stopwatch Timer Code to Other SC140 DevicesThe stopwatch timer implementation controls
Setting Up the Stopwatch Timer Within the Debugger 9Figure 4. Finding the Starting Address in the DebuggerAfter finding the starting address, the
10 Using the SC140 Enhanced OnCE Stopwatch Timer Figure 5. Event Detection Settings4.1.2 Setting Up the Event CounterThe event counter is configur
Setting Up the Stopwatch Timer Within the Debugger 11Figure 6. Event Counter Settings4.2 Stopping the Stopwatch TimerStopping the stopwatch time
12 Using the SC140 Enhanced OnCE Stopwatch Timer Figure 7. Event Counter Dialog Box When Debugger Halts at Breakpoint5 Setting Up the System Clock
Setting Up the System Clock Speed 13Figure 8. Programming Model of PCTL0Figure 9. Programming Model of PCTL15.1 Setting Up the PLL in Software
14 Using the SC140 Enhanced OnCE Stopwatch Timer With these configurations, the Fchip is calculated as expressed in Equation 3. Eqn. 3The PLL should
Verifying Correct Setup 15In EE_CTRL, the EE1DEF field is set to 00, which signifies output signal when detected by EDCA1. The remaining fields in E
OnCE is a trademark of Motorola, Inc.This document contains information on a new product. Specifications and information herein are subject to change
16 Using the SC140 Enhanced OnCE Stopwatch Timer Code 9. Testing Code#include <stdio.h>#include "EOnCE_stopwatch.h"#ifdef COMPILER_
Conclusion 177 ConclusionThis application note presented two techniques to measure the speed of execution of software running on an SC140 device, us
18 Using the SC140 Enhanced OnCE Stopwatch Timer
Complete Example of Profiling A-1Appendix AComplete Example of ProfilingA complete example of profiling using the Enhanced OnCE stopwatch timer in t
A-2 Using the SC140 Enhanced OnCE Stopwatch Timer Code A-2. EOnCE_registers.h/* EOnCE registers */#define EXCP_TABLE 0x7000#define REG_BASE_ADDRE
Complete Example of Profiling A-3Code A-3. EOnCE_stopwatch.c/* * Header file contains definitions of EOnCE memory-mapped register addresses, * and
A-4 Using the SC140 Enhanced OnCE Stopwatch Timer Code A-4. autocorr.c#include "EOnCE_stopwatch.h"#include <prototype.h>#include &l
Complete Example of Profiling A-5 asm("move.l #$00010000,PCTL1");} int main(void){ int rc = 0; unsigned long clock_ext, clock_val,tim
A-6 Using the SC140 Enhanced OnCE Stopwatch Timer
Abstract and Contents iii In software application development on embedded devices, optimization is critical. Optimized code provides not only faster
iv Using the SC140 Enhanced OnCE Stopwatch Timer 7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction 11 IntroductionA stopwatch timer is an apparatus for measuring the exact duration of an event. Measuring time during execution of code
2 Using the SC140 Enhanced OnCE Stopwatch Timer 2 SC140 Enhanced OnCE Stopwatch Timer CapabilitiesThis section presents the features of the Enhanced
Setting Up the Stopwatch Timer Within an Application 33 Setting Up the Stopwatch Timer Within an ApplicationThis section describes the operations ne
4 Using the SC140 Enhanced OnCE Stopwatch Timer Initializing the stopwatch timer consists of setting up the Address Event Detection Channel (EDCA). T
Setting Up the Stopwatch Timer Within an Application 532-bits of the flag variable’s address are used. Thus, EDCA1_MASK is set to 0xffffffff, meanin
Commentaires sur ces manuels