Part Number: TMS320C6678
Hi,
I am using TMS320C6678.I have created a new project and I am testing the EMIF Peripheral. I am writing a small code to configure the emif chip select and writing a data to a particular address and monitoring the data rate.
I am able to get the data rate of about 3.5MHZ only which is very much low with maximum configuration speed. I have attached the code and probing image. Please have a look at it and suggest to improve the data rate .Our required data rate is about 50MHZ which is possible according to the specifications.
CODE:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define EMIF_CE1SpaceTiming (volatile int *)0x20C00014
#define NAND_DATA_ADDR ((volatile unsigned char*)0x70000000)
#define EMIF_DATA_ADDR ((volatile unsigned int*)0x77FFAAAA) /*emif16_cs2_base */
#define EMIF_DATA_ADDR_1 ((volatile unsigned int*)0x77FF5555) /*emif16_cs2_base */
#define EMIF_DATA_ADDR_2 ((volatile unsigned char*)0x74000000) /*emif16_cs2_base */
/**
* main.c
*/
void emifWriteDataByte(unsigned char uchData)
{
volatile unsigned char* dest;
//platform_write("WRITE VALUE:%3d\n",uchData);
/* Data is written to the data register on the rising edge of WE# when
• CE#, CLE, and ALE are LOW, and
• the device is not busy. */
dest = (volatile unsigned char *)(EMIF_DATA_ADDR);
*dest = uchData;
}
int main(void)
{
*EMIF_CE1SpaceTiming = (0 \
| (0 << 31) /* selectStrobe */ \
| (0 << 30) /* extWait (never with NAND) */ \
| (0x1 << 26) /* writeSetup 10 ns */ \
| (0x01 << 20) /* writeStrobe 40 ns */ \
| (1 << 17) /* writeHold 10 ns */ \
| (0x1 << 13) /* readSetup 10 ns */ \
| (0x01 << 7) /* readStrobe 60 ns */ \
| (1 << 4) /* readHold 10 ns */ \
| (1 << 2) /* turnAround 40 ns */ \
| (1 << 0)); /* asyncSize 8-bit bus */ \
while(1)
{
emifWriteDataByte(0xAA);
}
return 0;
}
IMAGE:3.35mhz from one data to another data transfer

Thanks,
Thilak