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.

Ethernet connectivity with HDK board

Other Parts Discussed in Thread: HALCOGEN

hi,

   I am working with HDK board. I am trying to implement Ethernet connectivity through this board. I found some codes that i am attaching along with this post. But I want to know few things.

1. How the data accepted into the TMS570.  (into which memory location,register or what?)(I couldn't find the source, it seems to be through some interrupt but i was nt able to trace it out.)

2. how the data transfer takes place between TMS570 and EMAC module? (its mentioned in datasheet of TMS that the interface is sophisticated but what is it? is it any protocol??)

3. Similarly how the data transfer takes place between EMAC and PHY device?

Kindly help.

0508.lwip-1.3.2.rar

Thanks in advance,

Manmesha.

  • Manmesha,

    Please see chapter 29 of TMS570LS31x/21x 16/32-Bit RISC Flash Microcontroller Technical Reference Manual (SPNU499).  29.2.11 and 29.2.12 in particular.

    But referring to the block diagram,   the MII/RMII bus is the answer to your question #3.   The DMA bus is the answer to your question #1,#2. The DMA is sometimes called "CPPI' and the CPI RAM holds DMA descriptors.   The Host CPU Interface is just the path that the CPU uses to get to the control registers and memory.  The MDIO bus is related to your question #3 but it is the phy management interface,  a specialized control port (not quite but similar in purpose to an I2C bus) that is used to access the PHY control registers to setup the phy.  (whereas the data that goes to the ethernet bus travels over the MII/RMII interface).

    manmesha patankar said:
    1. How the data accepted into the TMS570.  (into which memory location,register or what?)(I couldn't find the source, it seems to be through some interrupt but i was nt able to trace it out.)

      The EMAC includes a DMA controller that transfers data to memory. 

    manmesha patankar said:
    2. how the data transfer takes place between TMS570 and EMAC module? (its mentioned in datasheet of TMS that the interface is sophisticated but what is it? is it any protocol??)

       The TMS570 needs to write data to RAM and then submit the data to the EMAC's DMA module queue.

    manmesha patankar said:
    3. Similarly how the data transfer takes place between EMAC and PHY device?

    We support MII and RMII interfaces for data transfer from the MAC to the PHY.  MII is specified in the IEEE (standard 802.3 see Section 2, Clause 21).   RMII is an industry standard that is a reduced pincount adaptation of the MII standard;  1/2 the pins at 2x the clock rate,  single clock and multiplexed control lines.

     

  • Hi Anthony,

       Thanks a lot for ur reply. the document is really good. I have some few more queries.

    1. The code sends static image (appends HTML file with static data.). Can i get some help if instead of static data i want to send dynamic data through a web page?

    2. Also from application  point of view, I need to use CAN, Ethernet and i/o interfaces SIMULTANEOUSLY. (the kit will accept data through CAN interface.and need to process data transmit data through Ethernet interface onto the network. Also at intermediate stage the data needs to b processed.  ) Are there any sample application codes available that will guide me into this direction.

    3. Also, as far as halcogen is concerned, Is it used only wrt peripheral device initialization or a complete (with least coding in CCS)coding (i.e. data processing ) can be done? I want to know what is the exact role of Halcogen in HDK coding w.r.t Ethernet, CAN,SCI interfacing??And does it affects the execution time of the CCS code or it only reduces the code complexity?

    4. Also I am using CCS5.4. Does it provide real time data modification?? (it was there with CCS4.)

    Thanks in advance.

    Regards,

    Manmesha

  • Manmesha,

    manmesha patankar said:
    1. The code sends static image (appends HTML file with static data.). Can i get some help if instead of static data i want to send dynamic data through a web page?

    For support with lwIP you have to go to the lwIP community, you might start http://lwip.wikia.com/wiki/LwIP_Wiki .   

    manmesha patankar said:
    2. Also from application  point of view, I need to use CAN, Ethernet and i/o interfaces SIMULTANEOUSLY. (the kit will accept data through CAN interface.and need to process data transmit data through Ethernet interface onto the network. Also at intermediate stage the data needs to b processed.  ) Are there any sample application codes available that will guide me into this direction.

    I am not aware that we have posted any CAN/Ethernet bridging demo.  The lwIP demo with the static HTML page is about as far as we've gone. (TI).

    There are definitely commercial solutions that support both CAN and Ethernet.  If you are intersted in these you can check the list posted here: http://www.ti.com/lsds/ti/microcontroller/safety_mcu/rm4_arm_cortex-r4/tools_software.page#software

    manmesha patankar said:
    3. Also, as far as halcogen is concerned, Is it used only wrt peripheral device initialization or a complete (with least coding in CCS)coding (i.e. data processing ) can be done? I want to know what is the exact role of Halcogen in HDK coding w.r.t Ethernet, CAN,SCI interfacing??And does it affects the execution time of the CCS code or it only reduces the code complexity?

      

    HalCoGen provides low level code.  Device and peripheral configuration mainly.  The idea is to save you some time and headache by allowing you to get something going without having to start from scratch and read the 1000+ page TRM.   Regarding the execution time question - not sure what a comparison point would be. I also wouldn't say HalCoGen is optimized for speed;  so you might be able to rewrite certain functions to run faster.    And compiler settings also make a big difference in performance, if you select "Debug" for example the code will be easy to debug but run a lot slower than "Release".

    manmesha patankar said:
    4. Also I am using CCS5.4. Does it provide real time data modification?? (it was there with CCS4.)

     

    Yes, you can modify memory while the CPU core is running by selecting the DAP (instead of the CPU) and opening a memory window through DAP.

     

  • Hello,Manmesha Patankar!

        I am tenfyzhang, so pleased to know you are implementing the Ethernet module of HDK, Now, I just want to transmit datas by UDP protocol, I have used the HALCOGEN to generate the programme, but it doesnot include the UDP , so I just want to ask you for help, whether you do some work on it? if do,  can you share the programme with me, Thanks very much.

  • Hi,

       Thanks for your reply. Here is a simple schematic of what i intend to implement.

       1. Data comes from CAN network.

    2. It is accepted through CAN interface available on HDK board.

    3. Data is processed inside the processor and forwerded to Ethernet controller (or Physical device).

    4. The data (which is now in ethernet packet format ) is now transmitted to a PC  present in the same network through Ethernt.

     5. Acknowledgement or some data might also be transfered from PC to HDK kit through Ethernet interface.

      Can i get some help  or simple generic codes for this applicaiton.

    PLs help.

    Regards,

    Manmesha

  • Manmesha,

    Hi, what you're asking makes sense but we don't have any canned example software that implements such a system today.

    You probably need to look at what some of the third party OS vendors offer.   For example, I'm pretty sure Micrium can provide you with the components you need for the above system.  Although there are different protocol stacks for CAN and for Ethernet, so you would probably need to go into a little more detail with them.

    If you want to home-brew something,  HalCoGen inlcudes very low level code to manipulate the DCAN and you've probably seen the lwIP example posted for HalCoGen / Ethernet.
    I would caution you that especially when it comes to lwIP there is very limited support available from our Hercules team at TI.    

    I notice your registration says you are with IIT.  I thought I'd seen that RTOS vendors typically have special licensing arrangements for academic users.   So I'd encourage you to check into that option first.

  • Hi,

       thanks for your reply. I got what u said.

    1. Bt then does this controller support  protocol like FTP??? can i get some help in that sense??

    2. also,  I want to send dynamic data through the Ethernet. I could see few lines that speak abt dynamic data. But I need more help.

    3. Also what are the settings to b done so as to configure the Ethernet communication in duplex mode?

    Kindly help.

    Regards,

    Manmesha.

  • Hi Manmesha,

    manmesha patankar said:

    1. Bt then does this controller support  protocol like FTP??? can i get some help in that sense??

    2. also,  I want to send dynamic data through the Ethernet. I could see few lines that speak abt dynamic data. But I need more help

    Yes, but these are both questions about the different protocols that are part of a TCP/IP stack,  not the actual EMAC hardware.

    For lwIP, we lost our person that had expertise and so for now the best we can suggest is to http://www.nongnu.org/lwip/

    Regarding the dynamic data - you should probably look at the various APIs available as part of lwIP.  For example I see they have a sockets API.

    I don't see any FTP server listed in the lwIP docs.  There may be one available if you scour the net.  But then you would also need a file system too, wouldn't you?  If you want to transfer files?     

    manmesha patankar said:
    3. Also what are the settings to b done so as to configure the Ethernet communication in duplex mode?

    Check out the MACCONTROL register in the TRM's EMAC/MDIO section (Chapter 29 of SPNU499b).   Bit 0 is "FULLDUPLEX" and selects half or full duplex.  Has to be set for full duplex.  There are also some options in fullduplex for flow control (bit 4 of the same register)
     
    By the way - are you working on an academic / noncommercial project?  If so I think there's a good chance with the commercially supported OS's and here you'll also be able to get a file system, command line interface, etc.   Let me know if you want to explore this route further, we could check with the vendors that are listed on our product folder to see what options might be available.  Can't promise as this would be the first time I've checked - but I think I saw some that had such options available for noncommercial or student use. We'd want to take that discussion offline though - I want to be careful not to have such a discussion construed as recommending one vendor over another as all are important partners to us.
  • Hi,

       Thanks a lot for ur reply and help.  I am working on a academic project. Actually for now, we just need a simple data transfer over Ethernet using HDK kit to PC on the other end. I have the sample code (comes with CD) which includes all application codes in it. Due to shortage of time i want to find some temporary solution for time being. I appreciate your help though.

      Can u just help me understanding,

    1) In the given code in which specific function and through which variable, raw data from memory is accessed  by the code which is being transferred through Ethernet at later stage?

    2) Also if the raw data is initially stored in memory or registers initially ? if its memory, what is that memory location from where it is fetching the data?

    3) Which specific register/ variable  is holding the data during the packet transfer.

    4) When the data transfer is done in duplex mode, from which register/variable/memory location i can extract/receive the raw data back? Is it the same way data is transmitted and received or different?

       Kindly help me the above issues.

    Regards,

    Manmesha