This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do I reduce execution time and number of cycles, in a block copying of data code.

Hi there, this is a working piece of code that I have written and I am wondering if there is any way to reduce the overall execution time, number of cycles or maybe the size of the memory in the code.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
THUMB
AREA RESET, CODE, READONLY
EXPORT __Vectors
EXPORT Reset_Handler
__Vectors
DCD 0x00180000 ; top of the stack
DCD Reset_Handler ; reset vector - where the program starts
AREA 2b_Code, CODE, READONLY
Reset_Handler
ENTRY
num_words EQU (end_source-source)/4 ; number of words to copy
start
LDR r0,=source ; point to the start of the area of memory to copy from
LDR r1,=dest ; point to the start of the area of memory to copy to
MOV r2,#num_words ; get the number of words to copy
; find out how many blocks of 8 words need to be copied - it is assumed
; that it is faster to load 8 data items at a time, rather than load
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I am working with The Cortex M3, as long as one of those three things has been made smaller it's ok. Thank you for your help, the changes don't have to be major as long as something changes.

0