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.

TMS570LC4357: tms570lc4357-dp83869

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN, DP83869HM, DP83640, DP83869

Tool/software:

hii,

I am using  tms570lc4357  with ethernet phy dp83869hm, i am not able  to establish ethernet connectivity with tms, as halcogen is genrating drivers for 83860, please suggest solution to this

  • Hi Gourav,

    The driver code generated from HALCoGen is for DP83640

    You can follow the below procedure to make this DP83640 driver to work with DP83869.

    1. First you need to identify the API's that are using in DP83640 in application code.

    on my verification they are using the below highlighted four API's in the code:

    2. Now you should need to verify the PHY registers and corresponding bits that are using in these API's

    On my verification i found they are using below highlighted registers.

    On my verification i found they are using below highlighted bits:

    3. Now we should need to compare whether the above highlighted register addresses are same or not in both PHY IC's (DP83640 and DP83869).

    On my verification they look same in the the PHY IC's.

    So, my suggestion would be either take an existing example for DP83640 or else create one example. And do the test on the DP83869, most probably it should work.

    You can find ethernet examples in below link:

    (3) [FAQ] TMS570LC4357: Examples and Demos available for Hercules Controllers (E.g. TMS570x, RM57x and RM46x etc) - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    --
    Thanks & regards,
    Jagadish.

  • hii jagadish, I tried same, and run emac loopback example my code stuck in emac transmit function, please find the images.
    i have uploaded table of pin configuration with dp83869 and tms470, pin ball U8, R1, T2 and G4 AS MII_TX_D0-D3, E4 TXEN, T9 not found in data sheet as well as in halcogen, how do i configure it for transmission

  • hi Jagadish sir, requesting for solution for the above

  • Hi Gourav,

    I got similar issue thread:

    (2) while(((EMACSwizzleData(curr_bd->flags_pktlen)) & EMAC_BUF_DESC_OWNER) == EMAC_BUF_DESC_OWNER); - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    Here customer got the issue due to using of old HALCoGen code. So, verify whether you are using new HALCoGen only (4.7.1).

    And also make sure your pinmux settings to be correct.

    Just make sure your pinmux settings are as per below project:

    8865.LwIP (1).zip

    In the above project also, we are using same MII pins as yours. So please make sure your pinmux settings are as per the above project.

    --
    Thanks & regards,
    Jagadish.

  • I am able to successfully run emac loopback and data is coming in pbuf_array, Thanks for the support, does it mean my controller is able to communicate with phy, I am new to it 

  • Hi Gourav,

    It is successfully communicating with PHY.

    If it is not communicating with PHY then the code must be stuck with in the EMACHWInit API at below part of the code where we are reading the PHY ID.

    --
    Thanks & regards,
    Jagadish.

  • next I have to use mqtt over lwip stack, any reference for this

  • Hi jagadish, I used the lwip library in my project,,not able to autoassign ip from network, also, I try to  assign static ip, it is not pinging, what may be the possible reasons.

  • Hi Jagadish Sir,

    I'm using VS Code to build the application as part of the project. I followed the steps outlined above, but I'm still unable to establish a connection.

  • Hi Gourav,

    What about static IP? are you able to communicate properly with static IP?

    PHY wise no issues, right? I mean is your code getting through with PHY ID and PHY link status?

    And can verify and let me know that where exactly your code getting stuck in debug?

    --
    Thanks & regards,
    Jagadish.

  •  here it stucks for 12- 15 seconds

  • Hi Gourav,

    How you designed this custom board, did you take any reference of our Lauchpad or HDK.

    The reason for asking is because, both lauchpad and HDK have different designs.

    If you verify PHY CLK in put in both Launchpad and our HDK:

    Launchpad:

    HDK:

    As you can see in our launchpad we are providing PHY clock using ECLK from the controller, but in HDK we are providing clock using external clock generator.

    So, if you followed launchpad design then you should need to generate the 25Mhz ECLK on ECLK1 pin.

    For more details about configuration, just refer below link once:

    Minimal lwIP Project for Hercules LaunchPad - Hackster.io

    --
    Thanks & Regards,
    Jagadish.

  • Hi Jagadish,

    Please find the schematic in the attachment. We are using open-source tools for research purposes. An external clock of 25 MHz is provided.enet (2).zip

  • Hi Jagadish,

    Please find the schematic in the attachment. We are using open-source tools for research purposes. An external clock of 25 MHz is provided.

    1.do the clock configurations are same for both dp83869 and dp83640, because here we are using 83869,

     

    2. pins marked are not able to configure using halcogen, neither found in data sheet,

    I am worried more about pin T9 MDC PIN, code also stuck when mdio is reading th phy register,

    1512.enet (2).zip

  • We hve got pins in the privous version data sheet, they are not available in technical refernce mannual, will you please guide how to configure it mannually

  • Hi Gourav,

    I verified your schematic, and it is exactly same as our launchpad PHY connectivity like as shown below:

    LAUNCHXL2-570LC43 Development kit | TI.com

    So, i am suggesting you download the Launchpad LwIP example code in the below link:

    (+) [FAQ] TMS570LC4357: Step-by-Step process to execute the LwIP demo on the TMS570LC4357 HDK board using Dynamic IP (DHCP) - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    And make sure you are exactly using same pin configurations as per the above example.

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagadish, I had tries with the above configurations, it still stuck in that area, do the Vclock configurations are same for both 83640 and 83869, for 83640 vclk 4 is 37.5

  • Hi Gourav,

    VCLK4 doesn't have any dependency over PHY:

    This clock is only used for internal EMAC logic.

    Can you do one testing, can you try to increase MDC clock frequency to 2.5Mhz.

    Previously this value is 1Mhz, can you test with 2.5Mhz?

    This 1Mhz MDIO clock is working with DP83640 but not sure on DP83869

    Try with 2.5Mhz and let me know the result.

    --
    Thanks & regards,
    Jagadish.

  •   I change the mdc configuration,also i had given static ip, same result dp83640 also having same clock configurations,
    Do, you have example code with freertos. 

  • Hi Gourav,

    I change the mdc configuration,also i had given static ip, same result dp83640 also having same clock configurations,

    You are correct.

    Can you setup one live debugging session on this, so that i can verify your code and test results directly.

    Do, you have example code with freertos. 

    We have only one FreeRTOS example on LwIP and you can find it in below link:

    (+) [FAQ] TMS570LC4357: Examples and Demos available for Hercules Controllers (E.g. TMS570x, RM57x and RM46x etc) - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    --
    Thanks & regards,
    Jagadish.

  • Sure, Please share availability, where to share meeting link

  • Sure, Please share availability, where to share meeting link

    I will be available from 10AM to 7PM Indian Standard Time (IST)

  • Shall we schedule for tomorrow 19-july-2024 at 1330 hrs as per IST, 

  • Hi Gourav,

    I am on sick leave yesterday and i have lot of issues to work on today.

    If possible, schedule at today evening after 6PM IST or else Monday.

    --
    Thanks & regards,
    Jagadish.

  • are you available at 6:40 pm

  • Sure,

    Please share the meeting link.

  •  below is the link

    Meeting_tms570lc4357_dp83869

  • or, (No title)
    Friday, July 19 · 1:30 – 2:30pm
    Time zone: Asia/Kolkata
    Google Meet joining info
    Video call link: meet.google.com/kjf-nkez-hvr

  • Friday, July 19 · 1:30 – 2:30pm

    It is at 6:40 right?

  • (No title)
    Friday, July 19 · 6:40 – 7:40pm
    Time zone: Asia/Kolkata
    Google Meet joining info
    Video call link: https://meet.google.com/dkg-qovr-oie

  • please excuse, 
    kindly follow the above link

  • Thanks for the meeting link gourav, i will join at 6:40PM today.

  •      HERE WE STUCK DURING DHCP IP,

  •     ABLE TO ASSIGN STATIC IP BUT NOT ABLE TO PING

  • Hi Jagadish I have found diffrences in the schematic, do these  the reason, here in our schematic TXD[3:0] are connected invertly

  • Hi Gourav,

    I think this could create a problem:

    As there were two names in your schematic, i also confused in my verification for the first time, the red color names at PHY side looks correct but the blue color names looks wrong on the PHY side.

    However, i think the connections between PHY and controller made using blue names. So, the real connectivity between PHY and controller will look as below:

    As you can see TXD0 at controller finally connected to the TXD3 at PHY, similarly TXD1 at controller to the TXD2 at PHY, TXD2 at controller to the TXD1 at PHY and TXD3 at controller to the TXD0 at PHY.

    This will may not affect the MDIO communication between PHY and controller as this communication takes on other lines MDC and MDIO, that is the reason maybe we don't have any issues for PHY ID receiving and PHY link status etc. However, this might create issues for ethernet data communication, here the bits might be shuffle and the data might be received wrongly by other end device like router or PC.

    --
    Thanks & regards,
    Jagadish.

  • How to rectify this,using pinmux settings, or any configuration in software

  • Hi Gourav,

    I think firmware wise we can't rectify this issue as it is related to hardware pin connectivity. 

    I am thinking of two ways:

    1. I think we should somehow need to disconnect these pins connectivity between controller and PHY IC and should need to connect them correctly using external wires.

    Maybe we should need to identify these four tracks on PCB and need to cut them and need to make right connectivity using external wires. Maybe this is not an easy process.

    2. I hope this PCB is a prototype PCB, so maybe you need to design another PCB with right connectivity.

    I don't know any other possible ways.

    --
    Thanks & regards,
    Jagadish.

  • Ae you sure, this is the reason, it is very difficult for us to go for design a new hardware at this stage, please suggest any alternative solution if exist, i am also finding.

    Thank you, for very good support

    gourav

  • Sure gourav, if i have any alternative solution then i will suggest you.

    --
    Thanks,
    Jagadish.

  • Hi Gourav,

    I don't know any other easy alternative than changing the hardware.

    There could be one possible way, but it involves lot of effort and not sure whether it work also.

    That is changing the order of the data bits for every nibble (4 bits) which will get transmitted out through EMAC. This is very hard process and involves lot of effort to understand complete data which will get transmitted, and we should need to change the order of every nibble that will transmit out from EMAC.

    This is because end of the day the data from MAC will be transmitted in the parallel through four lines, right? I mean TXD_3, TXD_2, TXD_1 and TXD_0. So, if we consider one byte transmission it will get transmit in terms of two nibbles, right? 

    In our case the order of the nibble from MSB to LSB should be TXD0, TXD1, TXD2 and TXD3, so we need to change each nibble data order as this. I can't do this at my end because it involves lot of effort and time consuming. If you want to try it out, you need to build your own application.

    But my suggestion would be better to go for my previous two suggestions only.

    --
    Thanks & regards,
    Jagadish.

  • Hi we have changed the pin configuration in the hardware, now while assigning dhcp it is showing error for phy alive status, whie autoassign ip ip will be assigned but not ping.


       

  • Hi Gourav,

    whie autoassign ip ip will be assigned but not ping.

    You mean static ip?

    dhcp it is showing error for phy alive status,

    If for static ip PHY alive status success means for DHCP also it should be success only. After PHY alive status only we will assign the ip address, so for static ip if the PHY alive status success means for DHCP it should not stuck at PHY alive status?

    Are you using same code for static and DHCP? We should just change the lwIPInit argument as IPADDR_USE_DHCP right?

    --
    Thanks & regards,
    Jagadish.

    • Yes, I have changed that, and also using same code, 
  • Hi Gourav,

    Also, can you please try to increase the below DHCP try "count" value from 10 to 100

    --
    Thanks & regards,
    Jagadish.

  • is there any other example available like tcp client or tcp echo server


  • 1067.hdkif.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /**
    * @file - hdkif.c
    * lwIP Ethernet interface for Hercules Devices
    *
    */
    /**
    * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
    * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without modification,
    * are permitted provided that the following conditions are met:
    *
    * 1. Redistributions of source code must retain the above copyright notice,
    * this list of conditions and the following disclaimer.
    * 2. Redistributions in binary form must reproduce the above copyright notice,
    * this list of conditions and the following disclaimer in the documentation
    * and/or other materials provided with the distribution.
    * 3. The name of the author may not be used to endorse or promote products
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    HL_phy_dp83640.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /**
    * \file phy_dp83640.c
    *
    * \brief APIs for configuring DP83640.
    *
    * This file contains the device abstraction APIs for PHY DP83640.
    */
    /*
    * Copyright (C) 2009-2018 Texas Instruments Incorporated - www.ti.com
    *
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    HL_phy_dp83640.hHii, Jagadish as we have discussed regarding wrong pin configuration, we have inverted pins, also, I try making changes in hdkif.c, now every time my code is stuck in hardware initialisation error, I'm both cases DHCP and static IP, what may be the possible reasons.

    I am able to read all register value correctly, advertise 1000bps disable,as per data shéet, linkstatus also correct value receiving but at the end it is showing hardware initialisation error

1 2