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.

why MDIO_FREQ_INPUT in HL_mdio.h file is always 32000000U even if I change VLK3 as 100MHz or other?

Other Parts Discussed in Thread: LAUNCHXL2-570LC43, HALCOGEN, TMS570LC4357

Hi TI,

I am using LAUNCHXL2-570LC43 with lwIP demo. I have downloaded this demo project from the following link.

After I open the Project in CCS and Halcogen and do some modifications as per the descriptions from the page above. And everything is fine.
 And my LDK is working as lwIP webServer perfectly.

But I want to change the Peripheral Clock frequency to 100MHz instead of 75MHz. So after making HCLK_Diver as 2 and VCLK1,VCLK2,VCLK3 Diver as 0, I can get All my HCLK, VCLK1, VCLK2, VCLK3 as 100MHz. And then I press F5 so that HalCoGen generates the code.

But In my CCS window, MDIO_FREQ_INPUT macro is still 32000000U. Why it is still remains in this value?

As per trm, VCLK3 should be divided down to get MDIO Clk as 1MHz or 2.5MHz. If so It should get changed to 100000000U automatically, right?

Why it is not happening?

Or else what is this MDIO_FREQ_INPUT clock among all the available clocks in TMS570LC4357?

Please anybody clarify me. I am in confusion.

Thanks in advance.

Regards,

Karthikeyan.K

  • Karthikeyan,

    You said: . And then I press F5 so that HalCoGen generates the code

    But I didn't see where you said that you rebuilt your project (recompiled it) and downloaded the new project into the device to run.

    This is necessary - the F5 in HalCoGen is just like editing the source file. There are more steps involved like build and download before the code changes will appear on the target board.
  • Hi Anthony F.Seely,

    Here I explain what I am asking. Before that I am using LAUNCHXL2-570LC43. And from the trm, MDIO Control Register have CLKDIV field to specify MDIO Clock. So this field my be programmed in such a way that MDIO Clock should be 1MHz (typical) or 2.5MHz. Here is a snap shot.

    And This CLKDIV = (Peripheral Clock / MDIOCLK)-1

    And from trm I come to know that the peripheral clock mentioned above to calculate CLKDIV field is VCLK3.

    So In my case, I have set VCLK3 as 75MHz in HalCoGen, and then press F5, but MDIO_INPUT_FREQ Macro in HL_mdio.h file is defined as 32000000U

    See the HalCoGen snap shots below.


    CCS Snapshot is given below.

    So my doubt is HL_mdio.h filed is begin edited by HalCoGen to reflect the changed we made in GUI.

    So MDIO_INPUT_FREQ macro should be changed to 75000000U immediately I press F5 in HalCoGen, isn't it?

    Why it is not happening? Why it is still 32000000U?

    Or else whether MDIO_INPUT_FREQ is not representing VCLK3?

    And even after I make VCLK3 as 100MHz as shown below, MDIO_INPUT_FREQ macro is still 32000000U?

    I think now you can understand what I am asking exactly. Please clarify me. If I'm wrong in understanding, please correct me.

    Thanks in advance.

    Regards,

    Karthikeyan KasiVishwanathan.

  • Thanks Karthikeyan,

    That made it very clear.

    The reason is that the #defines are hard-coded to 32MHz and 1MHz in the template file.
    I submitted a CQ bug report - the number is SDOCM00120182.

    You should correct the issue manually until there is a fix.

    -Anthony