Other Parts Discussed in Thread: C2000WARE
Tool/software: Code Composer Studio
Hi
Question: If I use EMIF, what is the upper limit of the transmission speed of DMA?
In the datasheet:Throughput: four cycles/word (without arbitration). Does the 4 cycle here mean the cycle of the system? I did a test, the waveform is as follows:
dsp_addr:EM1A
dsp_ce1: EM1CS2
dsp_dq:EM1D
dsp_100m: EM1CLK,100M,The results obtained by the 200m clock.
dsp_wr:EM1WE
You can see from the above figure,every 7 clocks(EM1CLK) will have a data.Can the speed here be improved?
Part of the code is as follows:
Procedure 1:
void EMIF1Setup(void)
{
//Configure to run EMIF1 on full Rate (EMIF1CLK = CPU1SYSCLK)
EALLOW;
ClkCfgRegs.PERCLKDIVSEL.bit.EMIF1CLKDIV = 0x1;
EDIS;
EALLOW;
//Disable Access Protection (CPU_FETCH/CPU_WR/DMA_WR)
Emif1ConfigRegs.EMIF1ACCPROT0.all = 0x0;
if (Emif1ConfigRegs.EMIF1ACCPROT0.all != 0x0)
{
ErrCount++;
}
// Commit the configuration related to protection. Till this bit remains set
// content of EMIF1ACCPROT0 register can't be changed.
Emif1ConfigRegs.EMIF1COMMIT.all = 0x1;
if(Emif1ConfigRegs.EMIF1COMMIT.all != 0x1)
{
ErrCount++;
}
// Lock the configuration so that EMIF1COMMIT register can't be changed any more.
Emif1ConfigRegs.EMIF1LOCK.all = 0x1;
if (Emif1ConfigRegs.EMIF1LOCK.all != 1)
{
ErrCount++;
}
EDIS;
//Configure GPIO pins for EMIF1
setup_emif1_pinmux_async_32bit(0);
Emif1Regs.ASYNC_CS2_CR.all = (EMIF_ASYNC_ASIZE_32 | // 32Bit Memory Interface
EMIF_ASYNC_TA_1 | // Turn Around time of 2 Emif Clock
EMIF_ASYNC_RHOLD_1 | // Read Hold time of 1 Emif Clock
EMIF_ASYNC_RSTROBE_1 | // Read Strobe time of 4 Emif Clock
EMIF_ASYNC_RSETUP_1 | // Read Setup time of 1 Emif Clock
EMIF_ASYNC_WHOLD_1 | // Write Hold time of 1 Emif Clock
EMIF_ASYNC_WSTROBE_1 | // Write Strobe time of 1 Emif Clock
EMIF_ASYNC_WSETUP_1 | // Write Setup time of 1 Emif Clock
EMIF_ASYNC_EW_DISABLE | // Extended Wait Disable.
EMIF_ASYNC_SS_DISABLE // Strobe Select Mode Disable.
);
}
Procedure 2:
void dma_init()
{
volatile Uint16 transfer_cfg;
DMAInitialize();
DMACH5AddrConfig32bit(CFG_DATA_ADDR,&temp_buf_dma);
DMACH5BurstConfig(BURST,2,1);
transfer_cfg=sizeof(MCCfg);
DMACH5TransferConfig(transfer_cfg,1,0);
DMACH5ModeConfig(DMA_SPIATX,PERINT_ENABLE,ONESHOT_DISABLE,CONT_DISABLE
,SYNC_DISABLE,SYNC_SRC,OVRFLOW_DISABLE,THIRTYTWO_BIT,CHINT_END,CHINT_ENABLE);
}
Thank you very much