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.

EMIF clock on the external interface

Other Parts Discussed in Thread: TMS320C6455

Hi all,

I have a weird problem with the EMIF clocking. I have connected parallel DAC to the EMIF interface on the TMS320C6455 DSK Kit from Spectrum Digital. I have configured the EMIF to create DAC clock of 12 MHz using Setup/Hold/Strobe/Turn Around times in asynchronous mode. EMIF clock on the board is supplied externally and ECLKOUT is 96 MHz. When I checked the clock with the oscilloscope, I am getting 12 MHz, however, when I looked a little bit further back in time, there is a pause in a clock. So what happens is that I need a continuous clock of 12 MHz, but instead I am getting 12 MHz, plus random pause of 200 kHz, that repeats itself periodically at about 10.25 kHz I think. I am using DAC to create a modulated signal for the transmitter, so this pause causes "random bits" insertion. The way I write to the EMIF interface is like this:

/* Base address of the EMIFA */
#define EMIFA_CE4_BASE_ADDR (0xC0000000u)

/* Pointer that points to Async start area */
Uint32 *pAsyncData = (Uint32 *)EMIFA_CE4_BASE_ADDR;

// Some other Initialization code

// Read DIP switch (mapped at CE2 address 0xA0000000)

while(1) {

         // take next bit in a sequence

         pAsynchData[0] = Data;

}

So basically writing to EMIF is done in a while loop. The DIP switches are read once before entering the while loop.

Have anyone ever experienced this problem before? Should I write to EMIF using interrupt or something else instead to avoid clock pauses?

Any help is appreciated. Thanks in advance.

Vladimir

  • This is not exactly what the EMIF is intended for, but you seem to be doing a good job of finding a clever way to implement something outside of the box, so to speak.

    The use of kHz to describe pause and period is a bit vague to me. How long is the random pause in time and ECLKOUT cycles? How often does it repeat in time and ECLKOUT cycles? How much variation is there in the occurrence of the random pause?

    It is also not very clear what you are trying to accomplish with the DAC, so I am not sure how to help you find an alternative solution.

    The timer would be a good way to generate a timing signal like a 12 MHz clock, and you could generate an interrupt from a timer to know when to write new data. But that might not make sense depending on what you are trying to do.

    I recall someone else on the forum trying to do something similar, so it might be worth your time to do some searches for EMIF and DAC, etc.

  • Hello Randy P,

    Thanks for the reply. I realize that EMIF is technically was designed for the external memory, but it seems to be suitable for this DAC operation too. So in terms of the ECLKOUT cycles, this is what I get:

    Pause in a continuous AWE clock is 5 uS, which is 60 asynch memory cycles (Setup + Strobe + Hold + TA), and at 96 MHz ECLKOUT this is 480 ECLKOUT cycles. This repeats every 10.25 kHz, which is every 97.5 uS, or about 1170 asynch memory cycles and 9366 ECLKOUT cycles. As far as variation, this happens continuously.  That is I tried to change the period of the AWE signal (make it larger, or smaller) and this pause still exist, which means this is something that is always there... Just to add I have tried to disable DDR2 controller, and I also changed "Command Starvation" to 1 cycle, and to disable state. I did not really know if that will change anything and it did not. I tried turning DDR2 controller off, because some manuals and some forums mentioned that it can be due to SDRAM refresh time. However, on TMS320C6455 this option is no longer present for asynchronous interface, so turning controller off did not help either.

    As far as what I am trying to accomplish with DAC, I am generating baseband signal on the DSP. So I am converting bits into square pulses for example. When this clock pause happens, I loose those pulses.

    I was thinking about using timer as an alternative approach for clock generation, however, I am concerned with one thing. If this pause happens periodically, will my writing to the DAC will also stop periodically? If writing to the external interface is not tied to any way to AWE strobe, than I guess it's a good solution to the problem. 

    I looked through a lot of posts everywhere, and I saw a lot of people using EMIF for the ADC, however, I will try to search more too.

    Thanks in advance.

  • This pause is troubling to me, but it may be difficult to find the cause remotely. It appears that you lose 5 uS of every 97.5 uS, or about 5%. Have you been able to test all of the other chip select and control lines to see if there is any other apparent activity going on during that pause? Is there anything else running on the DSP other than this write loop?

  • Randy,

    I know this pause is wierd to me too, and most importantly I do not know where it is coming from. Based on some application notes, connection of DAC to EMIF is a common thing, because this is how 5-6K board works. At least this is how it looked like to me. Either case, I did not check all other signals, but I tried to see couple more things. First of all this pause appears to be present on data lines too when I toggled them. Second of all this DSK kit has CE2 and CE3 enable outputs, and those oscillate too. This is wierd to me because I am not using CE2 or CE3 spaces and also I disabled the bit that makes CE output strobe together with the AWE output (Forgot the name of the function). I simplified program down to just writing to EMIF and that is all, and I still have this problem. So there is nothing in the background either. Wonder if it has something to do with Spectrum Digital design. I will also check reading signals and other signals on the EMIF connector.

    Thanks.

    Vladmir.   

  • Would you mind zipping up your simplified program that just writes to EMIF and attach it to a reply here?

    Someone should be able to at least duplicate your observation, and we might be able to report on why. The odds are it is a fact-of-life, but I have never heard it mentioned before.

    Vladimir Podosinov said:
    Second of all this DSK kit has CE2 and CE3 enable outputs, and those oscillate too. This is wierd to me because I am not using CE2 or CE3 spaces and also I disabled the bit that makes CE output strobe together with the AWE output (Forgot the name of the function).

    Are you saying that the CE2 and CE3 pins oscillate? What exactly do they look like during the pause, usually high and then low during the pause, pulsing at some rate during the pause?

  • Hi Randy,

    I am attaching the simple EMIF test file that I have made from the example provided with the DSK. Also I am including GEL file, because maybe it can shed some light. I have tested additional output pins, and here is what I have found:

    -CE2 oscillates at the same rate as AWE, that is 12 MHz,  however, the duty cycle is smaller (The amount that CE2 is high).

    -I was wrong about CE3 - that one does not oscillate.

    -OE (AWOE#) stays low, as it suppose to all the time.

    -Read Strobe stays low too.

    -Ready input pin is disabled anyway, but stays low all the time as well.

    Besides those pins, the rest of the EMIF interface is not on the daughter-card connector. I do not have 2 probes to compare the CE2 output at the same time as AWE output (Their phase relation), however, CE2 output has exactly same amount of pause that I was talking about as the AWE pin. So 480 ECLKOUT cycles. CE2 output is mapped to CPLD for this DSK Kit. When I initialize memory, I set CE2 space to NULL, so wonder if there is some kind of conflict. Switches and LEDs are both mapped in CE2.

    Thanks for all.

    EMIF_Test.zip
  • Not sure what the problem was, but I was not able to download the file that you attached. I think the forum was having trouble with this because there were other reports of that same problem on other attachments.

    But your description was clear enough so I was able to write my own test case. I was able to duplicate the problem with the pauses.

    From investigation and internal discussions, we have determined that there is something occurring in the EMIF peripheral which is causing this, but we do not have a clear description. What we have determined is that there is a bit in a Reserved register location that can disable this pause.

    The reserved register location 0x7000000C has a reset value of 0x00000753. If you set bit 31 = 1 in this register, the pause will be disabled. You would want to write 0x7000000C = 0x80000753. This would only need to be written once.

    I am not sure how we will document this "feature", but my opinion is that it needs to be stated somewhere to avoid the 5% loss of EMIF bus bandwidth because of this pause. Thank you for raising the question.

    Please try this and let us know if this solves your problem. If it does, please mark this posting with the Verify Answer button.

  • Hello Randy,

    I am glad that you were able to replicate the results, even without the files. I have repeated the experiment and it did indeed work. I am very thankful that you have found this error's reason. Hope this will help in the future projects people do.

    Vladimir