Motorola ONCE SC140 Manuel d'utilisateur

Naviguer en ligne ou télécharger Manuel d'utilisateur pour Non Motorola ONCE SC140. Motorola ONCE SC140 User's Manual Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer

Résumé du contenu

Page 1 - Stopwatch Timer

AN2090/DRev. 0, 11/2000Using the SC140 Enhanced OnCE™Stopwatch TimerApplication Note by Kim-Chyan Gan and Yuval Ronen

Page 2

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

Page 3 - Abstract and Contents

 Setting Up the Stopwatch Timer Within an Application 7Code 4. C Code for Clock-Cycle-to-Time Conversiontypedef enum { EONCE_SECOND, EONCE_MILLISEC

Page 4 - Complete Example of Profiling

8 Using the SC140 Enhanced OnCE Stopwatch Timer 3.6 Adapting Stopwatch Timer Code to Other SC140 DevicesThe stopwatch timer implementation controls

Page 5 - 1 Introduction

 Setting Up the Stopwatch Timer Within the Debugger 9Figure 4. Finding the Starting Address in the DebuggerAfter finding the starting address, the

Page 6 - Capabilities

10 Using the SC140 Enhanced OnCE Stopwatch Timer Figure 5. Event Detection Settings4.1.2 Setting Up the Event CounterThe event counter is configur

Page 7 - Application

 Setting Up the Stopwatch Timer Within the Debugger 11Figure 6. Event Counter Settings4.2 Stopping the Stopwatch TimerStopping the stopwatch time

Page 8 - 3.1.1 Event Detector Control

12 Using the SC140 Enhanced OnCE Stopwatch Timer Figure 7. Event Counter Dialog Box When Debugger Halts at Breakpoint5 Setting Up the System Clock

Page 9 - 3.2.1 Event Counter Control

 Setting Up the System Clock Speed 13Figure 8. Programming Model of PCTL0Figure 9. Programming Model of PCTL15.1 Setting Up the PLL in Software

Page 10 - 3.2.2 Counter Registers

14 Using the SC140 Enhanced OnCE Stopwatch Timer With these configurations, the Fchip is calculated as expressed in Equation 3. Eqn. 3The PLL should

Page 11 - 3.5 Putting it All Together

 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

Page 12 - Debugger

OnCE is a trademark of Motorola, Inc.This document contains information on a new product. Specifications and information herein are subject to change

Page 13

16 Using the SC140 Enhanced OnCE Stopwatch Timer Code 9. Testing Code#include <stdio.h>#include "EOnCE_stopwatch.h"#ifdef COMPILER_

Page 14

 Conclusion 177 ConclusionThis application note presented two techniques to measure the speed of execution of software running on an SC140 device, us

Page 15

18 Using the SC140 Enhanced OnCE Stopwatch Timer 

Page 16

 Complete Example of Profiling A-1Appendix AComplete Example of ProfilingA complete example of profiling using the Enhanced OnCE stopwatch timer in t

Page 17

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

Page 18 - 6 Verifying Correct Setup

 Complete Example of Profiling A-3Code A-3. EOnCE_stopwatch.c/* * Header file contains definitions of EOnCE memory-mapped register addresses, * and

Page 19 - 6.1.2 Toggling EE1

A-4 Using the SC140 Enhanced OnCE Stopwatch Timer Code A-4. autocorr.c#include "EOnCE_stopwatch.h"#include <prototype.h>#include &l

Page 20 - Code 9. Testing Code

 Complete Example of Profiling A-5 asm("move.l #$00010000,PCTL1");} int main(void){ int rc = 0; unsigned long clock_ext, clock_val,tim

Page 21 - 8 References

A-6 Using the SC140 Enhanced OnCE Stopwatch Timer 

Page 22

 Abstract and Contents iii In software application development on embedded devices, optimization is critical. Optimized code provides not only faster

Page 23 - Appendix A

iv Using the SC140 Enhanced OnCE Stopwatch Timer 7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 24 - Code A-2. EOnCE_registers.h

 Introduction 11 IntroductionA stopwatch timer is an apparatus for measuring the exact duration of an event. Measuring time during execution of code

Page 25 - Code A-3. EOnCE_stopwatch.c

2 Using the SC140 Enhanced OnCE Stopwatch Timer 2 SC140 Enhanced OnCE Stopwatch Timer CapabilitiesThis section presents the features of the Enhanced

Page 26 - Code A-4. autocorr.c

 Setting Up the Stopwatch Timer Within an Application 33 Setting Up the Stopwatch Timer Within an ApplicationThis section describes the operations ne

Page 27

4 Using the SC140 Enhanced OnCE Stopwatch Timer Initializing the stopwatch timer consists of setting up the Address Event Detection Channel (EDCA). T

Page 28

 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

Pas de commentaire