AnsweredAssumed Answered

BF607 - Accessing L3 from core1 fails

Question asked by kaphje on Apr 1, 2015
Latest reply on Jun 25, 2015 by pfeifferc

Hi!

 

I'v got a customer board with a BF607 and 256MB DDR memory. The type of memory is the same as used on EZ board.

In the system.svc file on page LDF I setup the option "Use external memory" with a size of 256MB.

I've done the same configuration on core1.

The generated ldf files for both cores are nearly the same excepting the address ranges for L1 and L2 and the memory partition of L3.

The lower 128MB are mapped to core0. The upper are mapped to core1.

 

The DMC is configured on core0. After initialization I have read and write access to this memory. So, the interface is configured properly.

Now, I want to access the external memory from the application of core1. For a test I defined a global variable in the external memory and tried to fill it with data. Writing data into this array failed.

Then I disabled memory protection in system.svc for core1. After that I can access the memory mapped to core0.

 

 

#pragma align 4

section("sdram_bank2") uint8_t gTestDDR[MEM_TEST_SIZE];

volatile uint8_t* gTestDDR_core0 = (uint8_t*)0x04000000;

int main(void)
{
     adi_initComponents();

     uint32_t i;
     uint32_t Error = 0;

     uint32_t Error_core0 = 0;


     /* fill array with counter value - FAILS */

     for(i=0; i < MEM_TEST_SIZE; i++)
     {

          gTestDDR[i] = i & 0xFF;
     }

     /* compare data */
     for(i=0; i < MEM_TEST_SIZE; i++)
     {

          if (gTestDDR[i] != (i & 0xFF) )
             Error++;
     }

 

     /* fill array of core0 with counter value - SUCCESS */

     for(i=0; i < MEM_TEST_SIZE; i++)
     {

          gTestDDR_core0[i] = i & 0xFF;
     }

     /* compare data */
     for(i=0; i < MEM_TEST_SIZE; i++)
     {

          if (gTestDDR_core0[i] != (i & 0xFF) )
             Error_core0++;
     }

 

     while(1);

     return 0;
}

 

I've looked around and tried many things. But I haven't got a clue what's wrong.

Do I have to configure something on core1 to get access to the external memory?

 

Thanks a lot for your help.

 

Bye,

Jens

Outcomes