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.

  • Resolved

DSK C6713 EMIF as an output

Dear TI Employees,

I have this problem for like a year !

So could you help me we this ?

I guess I 'm so close to it with the helps I could get from DSPRELATED website, but I couldn't make it yet !

 I just wanna use my EMIF 80 pins as an output , to write a value into EMIF address .

As you may already know, we have LVTH16245A just before EMIF connector on the 6713 Spectrum Digital DSK, and I used 74HC244 as a buffer for my interfaced board to turn on 32 LEDs  on output. (Just as  considered in Rulph Chassing's book ! )

 

So please tell me that this code as below would be enough to do so, or we may need some headers or gel files to config the EMIF regiters via either CSL functions or assembly source codes.

 

 Well, I guess the main concern for programming is the I/0 address (either

0x90000000 or 0xa0000000) , right ?!

 

Thank you in advance.

 Best Regards,

rafi3e@ieee.org

 

// main.c *******************

 

#include "dsk6713.h"

 

#include "DSK6713_AIC23.h"                      //codec-DSK support file

Uint32 fs=DSK6713_AIC23_FREQ_48KHZ; //set sampling rate

#define DSK6713_AIC23_INPUT_MIC 0x0015

#define DSK6713_AIC23_INPUT_LINE 0x0011

Uint16 inputsource=DSK6713_AIC23_INPUT_MIC;

 

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#include <math.h>

#include <time.h>

 

#define OUTPUT 0xA0000000  //0x90000000 or maybe 0x80000000 (EMIF ADDRESS )

 

int *output = (int*)OUTPUT; // Declare a pointer to EMIF's address

 void main()

{      

      While (1)

    {

  // Write a 32-bit digital value to the pins

        *output = 0xA0A0A0A0; // Test value

    }

 }

 

 

4 Replies

  • Guru 84110 points

    Saadeq,

    Welcome to the TI E2E forum. Like many other E2E Community members, we hope you will contribute your experiences here by answering questions that you have already dealt with during the successes you have had during the past "year" of struggling with this particular issue. This site is not just about getting answers from TI employees, but also getting answers from the TI User Community, a much broader society than just our employees.

    Possibly when you originally posted your question, the formatting looked better than it does above. A feature that I use often is to click the Preview link next to Compose and Options. This will show you what the post will look like when you click Post. You have to go back to the Compose link to edit after that, but this feature helps when pasting text from another source. What I do is to copy text from some source, paste it into a simple text editor like notepad (I use PFE) and then copy from there into E2E. But that is just how I do it, other people may not have issues or may understand the editing buttons better than I do.

    Now to your actual question.

    To get your LEDs to light up, you will need the following to be done:

    1. Your interface board must latch the values written over the EMIF because the address and data values do not remain after the short EMIF write operation has completed.
    2. Your interface board must pull a control signal to the right state to enable the DSK's buffer to drive the 80-pin connector. You can refer to either the Technical Reference Guide for the board or the schematic to find which signal must be pulled to which state. It is probably called an Enable signal and may have External or Connector in its name.
    3. Your DSP's EMIF must be configured for the right mode for the right Chip Enable region. You have named the addresses for CE1 and CE2, so if those match the available CEs that go to the 80-pin connector, then one or both of those regions need to be configured in the EMIF registers. This is usually done in the GEL file for debug and has to be done in the application code for a stand-alone application.
    4. Your code shown above writes to CE2, so make sure that region is initialized somehow in the EMIF registers, either in your code or in your GEL file.
    5. Your code shown above should write the value correctly through the EMIF and to your interface board when all of the above are addressed.

    Regards,
    RandyP

     

    If this answers your question, please click the  Verify Answer  button below. If not, please reply back with more information.

    Search for answers, Ask a question, click  Resolved  when complete, Help others, Learn more.

  • In reply to RandyP:

    ·         Dear RandyP,

    I thank you so very much for your time, your considerations and your help.

    But I should let you know that I'm a professional web designer as well. so I knew about "preview" story about my post, I just did not know that TI E2E Forum has many problems with Google Chrome browser. So I've just edited my previous post and from now on, I'll just use IE browser.

     thanks a lot anyway :)

    Now to my actual question:

    As you may see now in my updated code, I put my main function code in an infinite loop (while (1)), so I guess we don't need to change the hardware now, right ?

    I also made another hardware, only for this problem which is by a microcontroller to get those 32-bit data , directly from that EMIF 80-pin connector and I can pull up or down any CE or other pins in this interfaced board. So could tell me which pins should exactly become pull up or down ?

    Furthermore, I have only one default gel file for the start up, do I have to add more gel files to my project or add some lines to the one I already have ? what should I add exactly ?

    If I understood your statements well, I do not need to use CSL functions or Micros or assembly code to config the EMIF registers, right ?!

    I will test anything you say, so please just feel free and give some options to test and be more specific.

    Thank you so much,

    Best Regards,

    rafi3e@ieee.org

     

     

  • Guru 84110 points

    In reply to AnonymousContent:

    saadeq rafieee
    I just did not know that TI E2E Forum has many problems with Google Chrome browser.

    Please post your problems with Chrome to the E2E News and Site Support Forum (bottom of the list under Support at the E2E home page). Chrome is a popular browser and we intend that it is fully supported.

    saadeq rafieee
    I put my main function code in an infinite loop (while (1)), so I guess we don't need to change the hardware now, right ?

    I expect you will change your mind later, but it is your engineering decision to implement your board how you wish. You still need to make the analysis and changes to make it work, below.

    saadeq rafieee
    I also made another hardware, only for this problem which is by a microcontroller to get those 32-bit data , directly from that EMIF 80-pin connector and I can pull up or down any CE or other pins in this interfaced board. So could tell me which pins should exactly become pull up or down ?

    This is an interesting new development. I definitely do not understand your motivation for this. But for both hardware implementations, you will need to look at the schematic or tech ref to find out the pin that needs to be pulled. If you were to purchase an interface card from one of our 3rd parties, like Spectrum Digital and Link-Research, those boards would already be designed to work correctly with the DSK. Perhaps someone else on the forum will have those schematics and can analyze them for you, or you might find this already answered by doing a search through the E2E search tool.

    saadeq rafieee
    I have only one default gel file for the start up, do I have to add more gel files to my project or add some lines to the one I already have ? what should I add exactly ?

    Since you are trying to customize your board, you need to do some engineering analysis and design. You also need to understand how to use and program the DSK. There are tutorials in CCS that help to explain the use of GEL files, and there are User's Guides that help to explain how the EMIF operates and gets configured. Your default GEL file may have some good examples that you can use to get started.

    saadeq rafieee
    If I understood your statements well, I do not need to use CSL functions or Micros or assembly code to config the EMIF registers, right ?!

    In your code, you can use CSL functions as a convenient way to configure the EMIF and to do other functions in your code. I do not know how you would use Micros in your code, but it does sound like you have one on your new interface board. I am a bit confused.

    We may need someone else to jump in here and tell you all your answers. Sorry I do not have them all for you.

    Regards,
    RandyP

    Search for answers, Ask a question, click  Resolved  when complete, Help others, Learn more.

  • In reply to RandyP:

    Dear RandyP,

    Excellent !

    Congratulations :)

    Well done !

     

    I thank you so very much for your helps as well as other guys from DSP-related groups who helped me to success in this project.

    Tonight is one of the best nights of my life !

    I feel like I'm in the air :))

    I'm working on different DSP projects via TMS320C6713-DSK for like 2 years, but I had a little problem with this project which was unbelievable !

    I feel like a weight has been lifted off my shoulders and I can put my mental and physical energy into some huge steps instead.

    It was very odd how I could make it ! but I thank you all so much :)

    As matter of fact, It's no Nobel, but to me ; it was a gift from heaven the way I could afford this problem :)

    Eventually, it occurred to me that my code must be true and sufficient; my hardware was authentic as well, so I just found out that I should check only CE1, CE2, CE3 and other read/write/output pins of my DSK. I've read all EMIF manuals of TI Inc, and I've tested about 4-5 hundreds of lines for configuring EMIF registers, but I wasn't right ! It was all wrong !

    Anyway, I've tested my whole interfaced board and my connections, my whole design, from software to hardware, then I found out it will work

    just by pulling down (connect the pin to GND) the Pin-75 of (peripheral expansion interface)PCI (NOT EMIF) connector.

    then both of my hardwares (the one with 74ls244 and LEDs, and the one with microcontroller directly interfaced to EMIF without any buffer or latch)

    will work perfectly. And of course If do not put your main function in an infinite loop, you should hold the data by a latch or flip-flop.

    To sum up, I should state that you do not need any gel file (except the default one for startup) or CSL function or ... to config EMIF registers individually. The headers I've included are enough for a complete signal processing project using codec (for analog inputs and outputs), EMIF expansion (as digital output), etc. So notice that this code is very short but much more clever than what brilliant minds might think !

    Thank you TI,

    Best Regards,

    rafi3e@ieee.org

    This code is 100 % demonstrated and is an adequetly tested code on C6713 Spectrum Digital DSK :

     

    // main.c ******************* rafi3e@ieee.org

    #include "dsk6713.h"

    #include "DSK6713_AIC23.h"  //codec-DSK support file
    Uint32 fs=DSK6713_AIC23_FREQ_48KHZ; //set sampling rate
    #define DSK6713_AIC23_INPUT_MIC 0x0015
    #define DSK6713_AIC23_INPUT_LINE 0x0011
    Uint16 inputsource=DSK6713_AIC23_INPUT_MIC;

    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <math.h>
    #include <time.h>

     

    #define OUTPUT 0xA0000000  // EMIF ADDRESS for CE2 which will be enabled by pin 78 of EMIF connector

    int *output = (int*)OUTPUT; // Declare a pointer to EMIF's address

    void main()
    {      
    while (1)
    {

            // Write a 32-bit digital value to the pins

            *output = 0xF001100F; // Test value

    }
    }

     

     

     

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.