DSPRelated.com
Forums

Urgent! Cant access EMIF CE3 or CE3

Started by muneeb abid November 20, 2008
Hello

please can any one guide me regarding CE of EMIF i have done all the setting regarding CE2 or CE3. and then i am using EDMA to transfer the data from DDR2 to CE3 but i cant write anything on that CE3 area. I have tried all the relevent seting using CSL library but no use.I am writing the code i used to configue EMID and EMDA please i need urgent help .

in main i called these two function
CSL_FINST(((CSL_DevRegs*)CSL_DEV_REGS)->PERCFG1,DEV_PERCFG1_EMIFACTL, \ENABLE);

DSK6455_init();

An other file to initialize EMIF

#define EMIFA_CE3_BASE_ADDR (0xB0000000u)

#define EMIFA_MEMTYPE_ASYNC 0
#define EMIFA_MEMTYPE_SYNC 1

CSL_Status status;
CSL_EmifaObj emifaObj;
CSL_EmifaHwSetup hwSetup ;
CSL_EmifaHandle hEmifa;
CSL_EmifaConfig config = CSL_EMIFA_CONFIG_DEFAULTS;

CSL_EmifaMemType asyncVal;
CSL_EmifaAsyncWait asyncWait = CSL_EMIFA_ASYNCWAIT_DEFAULTS;
CSL_EmifaAsync asyncMem = CSL_EMIFA_ASYNCCFG_DEFAULTS;
Uint16 tempData;
/* Pointer that points to Async(CE3) start area */
Uint16 *pAsyncData = (Uint16 *)EMIFA_CE3_BASE_ADDR;

void emifInt(void)
{
memset(&emifaObj, 0, sizeof(CSL_EmifaObj));
memset(&hwSetup, 0, sizeof(CSL_EmifaHwSetup));

/* setting for asynchronous type */
asyncVal.ssel = EMIFA_MEMTYPE_ASYNC;
asyncVal.async = &asyncMem;
asyncVal.sync = NULL;
/* setup the hardware parameters */
hwSetup.asyncWait = &asyncWait;
hwSetup.ceCfg[0] = &asyncVal;
hwSetup.ceCfg[1] = NULL;
hwSetup.ceCfg[2] = NULL;
hwSetup.ceCfg[3] = NULL;
/* Opening the EMIFA instance */
hEmifa = CSL_emifaOpen(&emifaObj, CSL_EMIFA, NULL, &status);
if ((status != CSL_SOK) || (hEmifa == NULL)) {
printf("EMIFA: Error opening the instance. [status = 0x%x, hEmifa \
= 0x%x]\n", status, hEmifa);
return;
}
else {
printf("EMIFA: Module instance opened.\n");
}
/* Setting up configuration parameter using HwSetup */
status = CSL_emifaHwSetup(hEmifa, &hwSetup);
if (status != CSL_SOK) {
printf("EMIFA: Error in HW Setup.\n");
printf("Read write operation fails\n");
return;
}
else {
printf("EMIFA: Module Hardware setup is successful.\n");
}

After these settings i can still i cant accesss the memory area 0XB0000000 . i am using DSK6455 . EMDA configuration is file i can tranfer the data detween two memory locations in DDR . but when i give CE3 memory address it dont write anything. evening i tried to write the value using View memory.

Thanks in advance.
muneeb abid,

On Thu, Nov 20, 2008 at 6:26 PM, muneeb abid wrote:
> Hello
>
> please can any one guide me regarding CE of EMIF i have done all the setting
> regarding CE2 or CE3. and then i am using EDMA to transfer the data from
> DDR2 to CE3 but i cant write anything on that CE3 area. I have tried all the
> relevent seting using CSL library but no use.I am writing the code i used to
> configue EMID and EMDA please i need urgent help .
>
> in main i called these two function
> CSL_FINST(((CSL_DevRegs*)CSL_DEV_REGS)->PERCFG1,DEV_PERCFG1_EMIFACTL,
> \ENABLE);
>
> DSK6455_init();
>
> An other file to initialize EMIF
>
> #define EMIFA_CE3_BASE_ADDR (0xB0000000u)
>
> #define EMIFA_MEMTYPE_ASYNC 0
> #define EMIFA_MEMTYPE_SYNC 1
>
> CSL_Status status;
> CSL_EmifaObj emifaObj;
> CSL_EmifaHwSetup hwSetup ;
> CSL_EmifaHandle hEmifa;
> CSL_EmifaConfig config = CSL_EMIFA_CONFIG_DEFAULTS;
>
> CSL_EmifaMemType asyncVal;
> CSL_EmifaAsyncWait asyncWait = CSL_EMIFA_ASYNCWAIT_DEFAULTS;
> CSL_EmifaAsync asyncMem = CSL_EMIFA_ASYNCCFG_DEFAULTS;
> Uint16 tempData;
> /* Pointer that points to Async(CE3) start area */
> Uint16 *pAsyncData = (Uint16 *)EMIFA_CE3_BASE_ADDR;
>
> void emifInt(void)
> {
> memset(&emifaObj, 0, sizeof(CSL_EmifaObj));
> memset(&hwSetup, 0, sizeof(CSL_EmifaHwSetup));
>
> /* setting for asynchronous type */
> asyncVal.ssel = EMIFA_MEMTYPE_ASYNC;
> asyncVal.async = &asyncMem;
> asyncVal.sync = NULL;
> /* setup the hardware parameters */
> hwSetup.asyncWait = &asyncWait;
> hwSetup.ceCfg[0] = &asyncVal;
> hwSetup.ceCfg[1] = NULL;
> hwSetup.ceCfg[2] = NULL;
> hwSetup.ceCfg[3] = NULL;
> /* Opening the EMIFA instance */
> hEmifa = CSL_emifaOpen(&emifaObj, CSL_EMIFA, NULL, &status);
> if ((status != CSL_SOK) || (hEmifa == NULL)) {
> printf("EMIFA: Error opening the instance. [status = 0x%x, hEmifa \
> = 0x%x]\n", status, hEmifa);
> return;
> }
> else {
> printf("EMIFA: Module instance opened.\n");
> }
> /* Setting up configuration parameter using HwSetup */
> status = CSL_emifaHwSetup(hEmifa, &hwSetup);
> if (status != CSL_SOK) {
> printf("EMIFA: Error in HW Setup.\n");
> printf("Read write operation fails\n");
> return;
> }
> else {
> printf("EMIFA: Module Hardware setup is successful.\n");
> }
>
> After these settings i can still i cant accesss the memory area 0XB0000000 .
> i am using DSK6455 . EMDA configuration is file i can tranfer the data
> detween two memory locations in DDR . but when i give CE3 memory address it
> dont write anything. evening i tried to write the value using View memory.


1. Are you using a 6455 DSK??
2. Before you try to write somewhere, you need to know what, if
anything, is at that address. Have you consulted the 6455 DSK Tech Ref
manual to see what is at that address?? It could be most helpful.

mikedunn
>
> Thanks in advance.
>

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php