This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6678: EMIF INTERFACE ISSUE

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

  • Thilak,

    By casting the address/data as char, you may be sending byte writes across the bus infrastructure.  First, can you try to cast as uint32 pointer and data?

    Second ... to more significantly improve the performance, you will likely need to use the EDMA.

    Regards,
    Kyle

  • Hi,

      I have tried using the DMA mode.(In ping pong mode) to transfer the data and check the data rate whether it is improved or not but i am getting the rate which is lesser than the normal mode transfer.I feel i am missing some configuration to be done as such .Please check and suggest and i am attaching the pics.

    With dma mode- 1.6MHZ.

    Without dma -3.2Mhz

     with dma

  • Thilak,

    What is the signal you are probing?  If it's chip select, then one data phase is being transferred on every falling edge.  Whereas in the first picture there are two pulses per 3.2 MHz in the second picture there appears to be 11 pulses in the first burst and at least 10+ pulses in the 2nd burst.  Probably if you make the transfer count large (e.g,. ACNT=1024), and aligned on a nice even boundary you'll see the performance increase again.

    Regards,

    Kyle