cancel
Showing results for 
Search instead for 
Did you mean: 

Observing the different execution time for a function if placed at different code memory location on STM32F765NIHx controller

AN.4
Associate II

e.g:

Below are the execution time of memset() function at different locations.

1. memset() plcaed at 0x0000000000219e96 : Time = 57.10 usec for 3k buffer size.

2. memset() placed at 0x0000000000219d42 : Time = 28.66 usec for 3k buffer size.

- memset is used for reference, other function timings also varies.

- We have compare and verified assembly file for above two conditions,

assembly code generated for memset functions is same.

Below are the project settings:

-----------------------------------

1. Code Memory = Flash TCM

2. Flash ART Accelerator = Enabled

3. Flash prefetch buffer = Enabled.

4. Compiler optimization = -o2.

5. Tool chain = STM32CubeIDE, gcc.

6. Clock Frequency = 216Mhz

Queries:

--------

1. Need more details on why execution timings varies with memory location.

2. How can we achieve deterministic execution time of a particular function irrespective of memory location.

0 REPLIES 0