Motorola ONCE SC140 user manual

User manual for the device Motorola ONCE SC140

Device: Motorola ONCE SC140
Category: Computer Hardware
Manufacturer: Motorola
Size: 0.46 MB
Added : 4/11/2014
Number of pages: 28
Print the manual

Download

How to use this site?

Our goal is to provide you with a quick access to the content of the user manual for Motorola ONCE SC140. Using the online preview, you can quickly view the contents and go to the page where you will find the solution to your problem with Motorola ONCE SC140.

For your convenience

If looking through the Motorola ONCE SC140 user manual directly on this website is not convenient for you, there are two possible solutions:

  • Full Screen Viewing - to easily view the user manual (without downloading it to your computer), you can use full-screen viewing mode. To start viewing the user manual Motorola ONCE SC140 on full screen, use the button Fullscreen.
  • Downloading to your computer - You can also download the user manual Motorola ONCE SC140 to your computer and keep it in your files. However, if you do not want to take up too much of your disk space, you can always download it in the future from ManualsBase.
Motorola ONCE SC140 User manual - Online PDF
Advertisement
« Page 1 of 28 »
Advertisement
Print version

Many people prefer to read the documents not on the screen, but in the printed version. The option to print the manual has also been provided, and you can use it by clicking the link above - Print the manual. You do not have to print the entire manual Motorola ONCE SC140 but the selected pages only. paper.

Summaries

Below you will find previews of the content of the user manuals presented on the following pages to Motorola ONCE SC140. If you want to quickly view the content of pages found on the following pages of the manual, you can use them.

Abstracts of contents
Summary of the content on the page No. 1


Using the SC140 Enhanced OnCE
Stopwatch Timer
Application Note
by
Kim-Chyan Gan
and Yuval Ronen
AN2090/D
Rev. 0, 11/2000

Summary of the content on the page No. 2

OnCE is a trademark of Motorola, Inc. This document contains information on a new product. Specifications and information herein are subject to change without notice. Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and specifi

Summary of the content on the page No. 3

Abstract and Contents In software application development on embedded devices, optimization is critical. Optimized code provides not only faster processing speed but also lower power consumption and longer battery life. Optimized code also minimizes CPU load, enabling more applications to fit into a single chip. In selecting a processor for a system, it is important to understand and compare the speed of execution of different processors. All of these applications may require a stopwatch as

Summary of the content on the page No. 4

7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 8 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Appendix A Complete Example of Profiling iv Using the SC140 Enhanced OnCE Stopwatch Timer 

Summary of the content on the page No. 5

1 Introduction A stopwatch timer is an apparatus for measuring the exact duration of an event. Measuring time during execution of code on a Digital Signal Processor (DSP) is useful to identify opportunities for code optimization, to understand system loading, and to compare execution speeds of different processors. This application note presents techniques to implement a stopwatch timer on the StarCore, SC140, using the built-in features of the DSP’s Enhanced On-Chip Emulation (OnCE) module.

Summary of the content on the page No. 6

2 SC140 Enhanced OnCE Stopwatch Timer Capabilities This section presents the features of the Enhanced OnCE stopwatch timer and the resources required for implementation. The capabilities of the implementation of the stopwatch timer are also explained. 2.1 Features The Enhanced OnCE stopwatch timer provides the following features:  A 64-bit counter, incrementing on each DSP clock cycle. The counter is less susceptible to overflow with 64-bit precision.  The stopwatch timer can be used repe

Summary of the content on the page No. 7

3 Setting Up the Stopwatch Timer Within an Application This section describes the operations necessary to initialize, start, and stop the stopwatch timer within an application. The sequence of operations is shown in Figure 1. Additionally, this section presents the conversion of cycles to actual time and puts all the application code together. Finally, this section explains how to adapt the stopwatch timer code to other SC140-based devices. Initialize Stopwatch Enable Stopwatch Sequence Inst

Summary of the content on the page No. 8

Initializing the stopwatch timer consists of setting up the Address Event Detection Channel (EDCA). The role of EDCA in the stopwatch timer implementation is to trigger the commencement of the cycle countdown. The Enhanced OnCE supports six EDCAs. The implementation presented in this application note uses EDCA1, though this choice is arbitrary. Set up of the EDCA requires initializing the following four registers:  The 32-bit EDCA reference value register A (EDCA1_REFA).  The 32-bit EDCA r

Summary of the content on the page No. 9

32-bits of the flag variable’s address are used. Thus, EDCA1_MASK is set to 0xffffffff, meaning all address bits will be compared. 3.2 Starting the Stopwatch Timer The C code to start the stopwatch timer is shown in Code 2. Code 2. C Code to Start the Stopwatch Timer #include “EOnCE_registers.h” void EOnCE_stopwatch_timer_start() { WRITE_IOREG(ECNT_VAL,MAX_32_BIT); /* Countdown will start at (2**32)-1 */ WRITE_IOREG(ECNT_EXT,0); /* Extension will count up from zero */ WRITE_I

Summary of the content on the page No. 10

3.2.2 Counter Registers ECNT_VAL is a countdown counter, and ECNT_EXT is a countup counter. ECNT_VAL is decremented on each occurrence of an event, as specified in the control register. ECNT_EXT is incremented each time there is an underflow in ECNT_VAL. For maximum cycle counting capacity, the stopwatch timer implementation initializes ECNT_VAL to the largest possible value which is 4294967295, or 0xffffffff. ECNT_EXT is initialized to zero. 3.3 Stopping the Stopwatch Timer The C code t

Summary of the content on the page No. 11

Code 4. C Code for Clock-Cycle-to-Time Conversion typedef enum { EONCE_SECOND, EONCE_MILLISECOND, EONCE_MICROSECOND } tunit; unsigned long Convert_clock2time(unsigned long clock_ext, unsigned long clock_val, short option) { unsigned long result; switch(option) { case EONCE_SECOND: result= clock_ext*MAX_32_BIT/CLOCK_SPEED + clock_val/CLOCK_SPEED; break; case EONCE_MILLISECOND: result= clock_ext*MAX_32_BIT/(CLOCK_SPEED/1000)

Summary of the content on the page No. 12

3.6 Adapting Stopwatch Timer Code to Other SC140 Devices The stopwatch timer implementation controls the Enhanced OnCE by writing to its memory-mapped registers. The addresses of these registers are determined in the memory map of the device in which the SC140 core is embedded. The offset between the base address of the memory-mapped peripherals and the addresses of the Enhanced OnCE registers is the same across SC140-based devices. Therefore, when adapting the stopwatch timer code for a

Summary of the content on the page No. 13

Figure 4. Finding the Starting Address in the Debugger After finding the starting address, the event detector can be setup. The procedures are outlined in these steps: 1. Choose EOnCE > EOnCE Configurator > EDCA1. 2. Click PC in the “Bus Selection” box. 3. Enter the address of the first instruction in the measured code into the “Comparator A Hex 32-bits” box. 4. Click Enable in the “Enabled after Event On” box. Figure 5 on page -10 shows the event detection settings after performing these st

Summary of the content on the page No. 14

Figure 5. Event Detection Settings 4.1.2 Setting Up the Event Counter The event counter is configured to the same mode as described in Section 3.2.1, “Event Counter Control,” on page -5, except this time the configuration is made using the debugger windows: 1. Choose EOnCE > EOnCE Configurator > Counter. 2. Click Core Clock in the “What to count” box. 3. Click EDCA1 in the “Enable after Even On” box. 4. Type “0xffffffff” in the “Event Counter Value (Hex 32 bits)” box. 5. Check the box in the

Summary of the content on the page No. 15

Figure 6. Event Counter Settings 4.2 Stopping the Stopwatch Timer Stopping the stopwatch timer is achieved by halting execution of the application at a breakpoint. Set up the breakpoint at the point in the application at which timing should stop to achieve the desired affect. After the breakpoint is in place, the debugger can be instructed to run the application. When execution of the application reaches the breakpoint, the value of the stopwatch timer counters can be retrieved by opening

Summary of the content on the page No. 16

Figure 7. Event Counter Dialog Box When Debugger Halts at Breakpoint 5 Setting Up the System Clock Speed Every SC140-based device contains a Phase Lock Loop (PLL) block, which controls the operating frequency of the device. The frequency of the device is governed by the frequency control bits in the PLL control register, as defined in Equation 2. MFN  - --- --- --- -- - Fext × MFI +  MFD --- -- --- --- --- -- --- --- --- --- -- --- --- --- --- -- --- --- --- - - Fdevice = Eqn. 2 PODF × P

Summary of the content on the page No. 17

Figure 8. Programming Model of PCTL0 Figure 9. Programming Model of PCTL1 5.1 Setting Up the PLL in Software The clock frequency of the SC140 can be set up either in software or in hardware. This section describes how to set the SC140 in the Software Development Platform (SDP) to operate at 300 MHz using these two alternatives. The C code to set up the PLL to 300 MHz is shown in Code 6. Code 6. C Code to Set Up the PLL to 300 MHz #include “EOnCE_registers.h” void PLL_setup_300MHz() { a

Summary of the content on the page No. 18

With these configurations, the Fchip is calculated as expressed in Equation 3. 0  -- - 50MHz × 24 +  1 - --- --- -- --- --- --- --- -- --- --- --- -- --- --- --- -- - Fchip== 300Mhz Eqn. 3 41 × The PLL should be configured so that the resulting PLL output frequency is in the range specified in the device’s technical data sheet. 5.2 Setting Up the PLL in Hardware During the assertion of hardware reset, the value of all the PLL hardware configurations pins are sampled into the clock contro

Summary of the content on the page No. 19

In EE_CTRL, the EE1DEF field is set to 00, which signifies output signal when detected by EDCA1. The remaining fields in EE_CTRL are irrelevant because they are not used. Code 7 shows the setup code for EE control registers. Code 7. EOnCE_LED_init() void EOnCE_LED_init() { *((long *)EE_CTRL) &= ~(3<<2); /* Toggle EE1 when event1 happens */ } 6.1.2 Toggling EE1 The initialization previously discussed the set up of EE1 to toggle each time an event is detected by EDCA1. The same channel is als

Summary of the content on the page No. 20

Code 9. Testing Code #include #include "EOnCE_stopwatch.h" #ifdef COMPILER_BETA_1_BUG extern long ECNT_VAL; #else #include "EOnCE_registers.h" #endif void PLL_setup_300MHz() { asm("move.l #$80030003,PCTL0"); asm("move.l #$00010000,PCTL1"); } void main(){ unsigned long clock_ext,clock_val,clock_cycle,cycle_req; unsigned long time_sec; extern unsigned long CLOCK_SPEED; PLL_setup_300MHz(); EOnCE_stopwatch_timer_init(); /* Setup to event


Alternative user manuals
# User manual Category Download
1 Motorola CME-12D60 User manual Computer Hardware 3
2 Motorola MCU DT128 User manual Computer Hardware 3
3 Motorola MC68HC05RC8 User manual Computer Hardware 0
4 Motorola MCU CMD912x User manual Computer Hardware 0
5 Motorola HC12 User manual Computer Hardware 202
6 Motorola MCU DG128 User manual Computer Hardware 1
7 Motorola MVME3100 User manual Computer Hardware 6
8 Motorola MVME956UM2 User manual Computer Hardware 0
9 Motorola 68HC12BC32 User manual Computer Hardware 1
10 Motorola MCU 68HC912 User manual Computer Hardware 10
11 Motorola MPC8260 User manual Computer Hardware 5
12 Motorola MVME162 User manual Computer Hardware 26
13 Motorola PrPMC800/800ET Processor PMC Module User manual Computer Hardware 0
14 Motorola 68HC12B32 User manual Computer Hardware 9
15 Motorola MVME5100 Series User manual Computer Hardware 36
16 Sony MSAKIT-PC4A User manual Computer Hardware 2
17 Sony MRW62E-S1 2694866142 User manual Computer Hardware 5
18 Philips MATCH LINE 9596 User manual Computer Hardware 17
19 Sony 64GB SDHC Class 10 Memory Card Readers SF32UY User manual Computer Hardware 1
20 Philips PSC702 User manual Computer Hardware 1