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 interface

Other Parts Discussed in Thread: HALCOGEN, TMS570LS3137

Dear TI,

                                I am using TMS570LS3137 HDK board and i want to interface with external device which has 3 address line,8 data line,1 RD/WR,1 CS.I am using halcogen 4.01,ccs 6.0.

I am using EMIF for the first time so please guide.Also in Halcogen i saw there is 4 modules available

1.EMIF SDRAM

2.EMIF ASYNH1

3.EMIF ASYNH2

4.EMIF ASYNH3

Which type of module should we use and how to use the halcogen generated code.

  • Hello,

    I have forwarded your inquiry to one of our EMIF and TMS570LS3137 experts. They should be able to provide you with some guidance to get you started.

  • Hi Pandurang,

    It seems like you are interfacing to an asynchronous external device. The EMIF supports one chip-select dedicated for SDRAM interface (EMIF_nCS[0]) and three chip-selects for interfacing asynchronous devices/memories (EMIF_nCS[2,3,4]).

    You can choose to use either of EMIF_nCS[2, 3, 4] for connecting to the CS for the external device. HALCoGen also allows you to configure the timings for the interface based on the requirements for this external device. You also need to enable the required EMIF signals to be output on the assigned terminals by configuring the PINMUX tab on HALCoGen.

    Once you have your configuration done, "generate code" from HALCoGen. This will create the required muxInit() and emifInit() functions for you that setup the interface.

    Hope this helps. Let me know if you have trouble finding the necessary options in HALCoGen. You can also refer to this app note for generating code from HALCoGen and automatically including it in a CCS project.

    http://www.ti.com/lit/pdf/spna121

    Regards, Sunil

  • Dear Sunil,

    Thanks a lot for your valuable suggestion.     I have selected the asynch2 setting.I need only 3 address line and 8 data line ,1 CE,1 RD/WR,1 RESET LINE.I have used the halocgen setting as attached below.

    After this i have generated code and added in code composer.Now i need help to use the function that is how to to read and write address and data from generated code.

  • Dear sunil,

                         Awaitining for your reply.Please guide me in using the generated code for EMIF and accessing the data. 

  • Dear Sunil,

                            Please guide and tell us how to read write data.Which is the function  to be used for generating strobe,address,data.pls we are struck in this so pls guide

  • Hello again,

    As I mentioned before, code generated by HALCoGen includes initialization functions for the EMIF as well as that for any multiplexing configuration required (based on your mux selections and timing configuration).

    The external device is then mapped within the CPU's memory map. You are using the asychronous chip select 3 (oddly, possibly wrongly named ASYNC2 in HALCoGen). So in your case, the external device can be addressed starting from 0x64000000, as shown in the device datasheet.

    You can define your own structure in C depending on the number of addressable locations in the external device to make it easier to access. To try the access out initially you could just write to it as:

    *(volatile unsigned char *) 0x64000000 = 0x12; // for storing byte

    You can also read from this location similarly.

  • Dear Sunil,

                          Thanks a lot for your reply , I have some more queries regarding reading and writing for External IO access.

    1> Will TMS570 automatically generates the read and write strobes.

    2> Is there any functions like ReadEXTPort /Write or inport / outport  like many processor ,which automatically generates read and write strobes.

    Thanks and Regards

    Pandurang Pai

  • 1> Will TMS570 automatically generates the read and write strobes.

    Yes, the TMS570 EMIF manages the read and write control signals based on the nature of the access performed by the CPU and the external memory configuration.

    2> Is there any functions like ReadEXTPort /Write or inport / outport  like many processor ,which automatically generates read and write strobes.

    No, such functions do not exist. As I said earlier, the external memory is mapped to the CPU's 32-bit address space. Any location in external memory can then be addressed by the CPU without any special considerations about whether the memory is internal or external. The EMIF manages generation of the read and write strobes.

  • Thanks Sunil.. 

        Now we are one step further. I selected  ASYNC-3 EMIF and used 0x64000000 address for accessing the memory.

       ---->   We are  getting CS (chip select) &  nWE (Read /Write enable ) pulses but we are not getting any pulses in address line and hence no data is available in the data channel. What could be the reason..?

       -----> Should we pull up the address line internally..? 

     

  • Pandurang,

    This appears to be an issue with the configuration of the EMIF signal multiplexing. Can you please check that all required EMIF address and data lines are the selected functions for the respective terminals? Also ensure that bit 31 of the system module register GPREG1 (address 0xFFFFFFA0) is set.

    Regards, Sunil