Program running very slowly from internal SRAM

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

Posts: 1
Joined: Sat Mar 07, 2015 8:34 pm

Program running very slowly from internal SRAM

Sat Mar 07, 2015 8:48 pm

Hi All

Im new to the A5D31 processor and Im trying to run a program from internal SRAM. I have done the following

1. Set the PLL to 516MHz and PCK to 516MHz (no divisor), MCLK=129MHz (PCLK/4)

2. Boot from flash, copied my program into internal SRAM at 0x300000 and then run it from internal RAM with Stack pointer also pointing to internal RAM

3. Run my program which is basically as follows (a simple program to toggle an I/O pin connected to a scope with a delay between

4. The scope says that the toggle speed is 500us or approx 500ns per increment of the counter.

5. The delay loop is approx 7 instructions (ARM not thumb) as shown by the debugger

void testpeed(void)
volatile int i,j;

for(i=0;i<1000;i++) j=i;
for(i=0;i<1000;i++) j=i;

My question is having tried everything, e.g. change PLL frequency, PCLK divider etc all of which do as they expect (I have checked the PLL frequency and MCLK frequency by outputting it to a PCK0 output)
why does it take 500ns to perform 7 instructions with a processor clock of 516MHz. A PIC runs a faster!
Any clues would be gratefully received

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 2 guests