I'm working with data transfer of memory on-chip to memory off-chip and I'm using MDMA on BF527.
However, occurs that when I enable the transfer the address (memory off-chip mapped in address SDRAM Bank0) I not receive the data correctly. But when I make the transfer between memory on-chip to other memory on-chip the transfer occurs correctly.
Thus, I would like of help you for this issue.
The below follow my configurations of EBIU and MDMA.
#define MEM_BANK_ADDR 0x20000000
#define pWRITE_DATA ((volatile unsigned short *) (MEM_BANK_ADDR | 0x00000000))
*pEBIU_AMBCTL0 &= ~B0RDYEN;
*pEBIU_AMBCTL0 |= B0TT_1;
*pEBIU_AMBCTL0 |= B0ST_1;
*pEBIU_AMBCTL0 |= B0HT_1;
*pEBIU_AMBCTL0 |= B0RAT_1;
*pEBIU_AMBCTL0 |= B0WAT_1;
*pEBIU_AMGCTL |= (1<<1) | AMCKEN;
void InitMDMA(char source[ ], int size)
*pMDMA_D0_START_ADDR = (unsigned char *)pWRITE_DATA;
*pMDMA_S0_START_ADDR = source;
*pMDMA_D0_X_COUNT = size;
*pMDMA_S0_X_COUNT = size;
*pMDMA_D0_X_MODIFY = 2;
*pMDMA_S0_X_MODIFY = 2;
*pMDMA_D0_Y_COUNT = 0;
*pMDMA_S0_Y_COUNT = 0;
*pMDMA_D0_Y_MODIFY = 0;
*pMDMA_S0_Y_MODIFY = 0;
*pMDMA_D0_PERIPHERAL_MAP = (1<<6);
*pMDMA_S0_PERIPHERAL_MAP = (1<<6);
*pMDMA_S0_CONFIG = FLOW_AUTO | WDSIZE_8 | SYNC;
*pMDMA_D0_CONFIG = FLOW_AUTO | WDSIZE_8 | WNR | SYNC | DI_EN;
Note: I'm using the VisualDSP++ update 7.