hello:
I just want to relize a simp;e transfer from sdram to dspl2ram though EMDA3,and here is code ,but it doesn't work.Please help me. (My chip is C6747)
/*main*/
#include "stdio.h"
#include "C6747.h"
void WriteSdram();
void InitEDMA3();
Uint32 *DSPL2RAM =(Uint32* )0x11800000 ;
void main()
{
// int i=0;
C6747_init();
WriteSdram();
InitEDMA3();
// EESR=1;
ESR=0x1;
if(*(DSPL2RAM+255)==255)
printf("Write DSPL2RAM SUCCESS!\n");
else
printf("Write DSPL2RAM error\n");
/* for(i=0;i<256;i++)
{
*(DSPL2RAM+i)=i;
}*/
}
/*sdram*/
#include "stdio.h"
#include "C6747.h"
void WriteSdram()
{
Uint32 i;
Uint32 *SDRAM_StartAdd;
Uint32 Length=256; //长度最长应为ox20000000
SDRAM_StartAdd = (Uint32 *)0xC0000000;//EMIFB的起始地址为0xc0000000,EMIFB连接两块SDRAM
for( i=0;i<Length;i++)
{
*(SDRAM_StartAdd+i)=i;
}
if(*(SDRAM_StartAdd+255)==255)
printf("Write SDRAM Success!\n");
else
printf("Write SDRAM error!\n");
}
/*edma3*/
#include "C6747.h"
void InitEDMA3()
{
CCCFG=0x00003005;
PARSET0_OPT=0X00100009;
PARSET0_SRC=0xC0000000;
PARSET0_A_B_CNT=0x00010100;
PARSET0_DST=0x80000f00;
PARSET0_SRC_DST_BIDX=0x00000000;
PARSET0_LINK_BCNTRLD=0x0000ffff;
PARSET0_SRC_DST_CIDX=0x00000000;
PARSET0_CCNT=0x00000001;
ESR=0x1;
//IPR=0x00000001;
}
Thank you!