Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 123809

Forum Post: RE: srio loopback test destination memory

$
0
0

Hi Ganapathi,

i wrote test program below

#include <stdio.h>
#include <stdint.h>

#define MSMCCFG_BASE 0x0BC00000
#define MSMCCFG_C0SESL *( unsigned int* )( MSMCCFG_BASE+0x600 )
#define MSMCCFG_C0SESH *( unsigned int* )( MSMCCFG_BASE+0x604 )

#define MAR208 *( unsigned int* ) 0x01848340

typedef unsigned int Uint32;

int main(void) {

        volatile Uint32 *pdata;
        volatile Uint32 *cdata;
        int i = 0;

        // address region 0xd0000000 ~ 0xd0FFFFFF MAR setting off
        MAR208 = 0x0;

        // core 0 SESMPAX setting
        MSMCCFG_C0SESL = 0x00c000ff;
        MSMCCFG_C0SESH = 0xd0000014;

        pdata = (volatile Uint32 *) malloc(64*sizeof(Uint32));
        cdata = (volatile Uint32 *) malloc(64*sizeof(Uint32));

        pdata = (volatile Uint32 *)((Uint32) pdata + 0xd0000000 - 0x0c000000);
        cdata = (volatile Uint32 *)((Uint32) cdata + 0xd0000000 - 0x0c000000);

        memset((void *)pdata, 1, sizeof(Uint32)*64);
        memset((void *)cdata, 1, sizeof(Uint32)*64);

        for(i=0; i<64; i++)
                printf("[%02d] = [%d]\n", i, *(pdata+i));

         return 0;
}

i test this program on TMDSEVM6657 evaluation board, but i could not see the correct result.

memory content is not valid value. i don't know what is wrong.

but the code works properly only when ddr3 initialization is processed. so i think MSMC alias setting can't be done with above code.

please give me some advice

thanks


Viewing all articles
Browse latest Browse all 123809

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>