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.

LMK03318: How to load the .tcs file into clock generator using Uboot I2C commands

Part Number: LMK03318
Other Parts Discussed in Thread: USB2ANY

Hi,

Using TICS Pro Software, I was able to configure the clock frequencies properly.

With this image using USB2ANY converter connected to I2C of LMK03318 was able to configure the clock too.

Now in the production line it is not appropriate to expose the I2C lines outside. So the plan is to , load this .tcs file from the U-boot (Preferably using commands).

Is there a way I can do this ?
Please suggest me some of the resource that I can refer to.

Thanks,

Sameeksh M Shetty

  • Hi Sameeksh,

    The .tcs file is a configuration file designed to be interpreted by the TICS Pro software. The device only needs to know the register settings associated with that configuration, which can be obtained by "File" --> "Export hex register values" in TICS Pro. Inside the hex register value file, each row refers to a specific register in the LMK03318 (e.g. R0) and has a hex value. The first two hex digits are the register hex address and the second two hex digits are the register value.

    I assume that you want to program the device once on the production line and then have it manage itself afterwards. Then you will need to program the register information into the device's EEPROM, so it will start up with that configuration every time. I will explain the steps used for manual EEPROM programming.

    • I am not familiar with U-boot but it is capable of carrying out I2C transactions (here is a tutorial I found on the internet: https://www.gibbard.me/uboot_i2c/). You should check if you can locate the device and issue read commands to it. If the read commands are successful, then the U-boot I2C interface should be compatible with the LMK03318 and you can proceed.
    • The first step is to load the device registers with the values from the configuration. For every register in the hex register file, issue a corresponding write command. When you are done the device registers should be loaded with the correct settings for your configuration. These changes will be lost if you power cycle the device, so we are not done yet.
    • Next, follow the "Write SRAM" process in section 10.5.4 of the datasheet. SRAM is a temporary holding place for register settings before programming them into EEPROM. Be sure to program the correct SRAM page that corresponds to the EEPROM page used in your design.
    • Lastly, follow the "Write EEPROM" process in section 10.5.5. of the datasheet.  After this is done, power cycle the device and verify if it is behaving as expected and if the registers are the same as you programmed.

    Let us know if you have more questions about the procedure, I may not be able to help much with U-boot itself.

    Best,

    Evan Su

  • Hi Evan Su,

    Need one more information, about the choice of output-driver in TICS Pro.

    In TICS Pro, “DIFF/1.8V LVCMOS output driver” block in Outputs section , requires me to select right output voltage signal standards for the generated frequencies. 


    In my case following are the voltages:

    OUT0 = 1.8V (ADC-1)                

    OUT1 = 1.8V (ADC-2)

    OUT2 = 1.8V (FPGA)

    OUT 3 =Disabled

    OUT4 = 1.8V (Ethernet switch)

    OUT5 = 3.3V (A9 processor)

    OUT6 = Disabled

    OUT7 = 1.8V (USB 2.0)

     

    Can you pls let me know which voltage standards will be suitable for the above mentioned output voltages?

    If you have any resource related to this pls do share them too.

    Thanks,

    Sameeksh M Shetty

  • Sameeksh,

    The only difference between using 1.8 V, 2.5 V, or 3.3 V on the output supplies is the amount of current that would be drawn. Any of the output formats can be used with any of these supply pin voltages. 

    See this excerpt from the datasheet:

    Note that the LVCMOS outputs are always 1.8 V - the Status pins can be used for 3.3 V LVCMOS outputs.

    Otherwise, any of the output format types can be used with any of the allowable supply voltages.

    Thanks,

    Kadeem

  • Hi Sameeksh,

    To be extra clear, if you are wondering how to pick between output formats in TICS Pro (AC-LVPECL, AC-LVDS, HCSL, etc.), that decision should be made based on the specific requirements of each of your endpoints (ADCs, switch, processor, USB); their datasheets should say what kind of input clock they expect.

    From an electrical signal perspective, the differential formats (LVPECL, LVDS, HCSL, CML) will specify a certain common mode voltage and a certain voltage swing. This swing will vary between formats but is independent of the supply voltage of the output driver, the receiver, or the endpoint. So if your FPGA is operating at 1.8 V for example, that does not tell me what kind of input clock it expects. The single-ended CMOS format is special because it swings rail-to-rail, so the supply voltage of the output driver needs to match the supply voltage of the receiver.

    The configuration I provided you yesterday has everything set to AC-LVPECL but I do not know if all of your receivers expect AC-LVPECL clocks. If they do not, make the appropriate changes within the configuration. You may also need to review the schematic of your design to verify that the termination schemes are correct for each format. Let us know if you have specific questions.

    Best,

    Evan Su 

  • Sameeksh,

    For your convenience, I have provided the swing information below for the differential output formats (the HCSL outputs would be for PCIe applications specifically):

    Thanks,

    Kadeem

  • Hi Evan ,

    The approach you have suggested here might be very useful.

    I have one concern regarding the writing/Reading of I2c block registers. There is a specific format that it is following for transmitting the data over I2C.

    Ref:-https://www.ti.com/lit/ds/symlink/lmk03318.pdf?ts=1688015590403&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FLMK03318%252Fpart-details%252FLMK03318RHSR

     The link you have shared before talks about writing individual registers.But in this case I need to write a block of register (somewhat recursively)

    Can you pls suggest reference that helps me with this task.

    Thanks,

    Sameeksh M Shetty

  • Hi Sameeksh,

    In the programming process all operations can be carried out with a sequence of individual register writes, you should not need to write multiple registers as part of one I2C transaction. I think the "block" read/write the datasheet discusses is perfectly capable of addressing individual registers. The name may come from the fact that you are allowed to write multiple bytes to one starting address (which I would not recommend to start out with because it could be confusing).

    I again have no experience with U-boot, but if you try using it to read individual registers in the device and the results are correct, then the I2C transactions should be formatted fine and you can proceed.

    Best,

    Evan Su

  • Hi Evan ,

    Continuing the conversation, as you have told earlier the hex file that is being exported from TICS Pro software contains information about registers and the corresponding values that are to be written into those registers.

    The hex file that is exported in my case has instance of R169,R172,R173.

    But these registers are not present in the register map of LMK03318.

    There are some registers that are present in register map but are missing in the generated hex file.

    How should I go about this?

    Regards,

    Sameeksh M Shetty

  • Hi Sameeksh,

    But these registers are not present in the register map of LMK03318.

    Sometimes TICS will have registers that don't exist in the device as holding places for configuration information. I do not think there is any harm done in programming them anyway because that is what the software does, but in theory you could leave them out without issues. I will let Kadeem comment on this because he is more familiar with this device than me.

    There are some registers that are present in register map but are missing in the generated hex file.

    Conversely, TICS will sometimes hide registers that appear in the datasheet. The reason for this is that some datasheet registers are only used rarely and/or have the potential to cause major problems when misconfigured, so we do not include them in the GUI. For the majority of customers they should be left in their default factory state, so I would not recommend programming them.

    Best,

    Evan Su

  • Hi Evan,

    The custom board has arrived, in here the LMK03318 IC is already integrated. In the first power cycle , the values stored in ROM / EEPROM will be used to configure the output frequencies.

    Before loading the register configuration from TICS software, I need to make hardware changes to select appropriate state for HW_SW_CTRL, REFSEL1 and GPIO[5:0]  , so that when I power up my board (for the very first time) the clock generator outputs frequencies are within the safety limits of the connected devices. Can you please suggestion me the configurations that would be apt for the expected frequencies.

    OUT0 = OUT1 = OUT2 = 40MHz

    OUT3 = Disabled

    OUT4 = 25MHz

    OUT5 = 33.3333MHz

    OUT6 = Disabled

    OUT7 = 24MHz

    This snap shows the clock generator with expected frequencies .Also it shows the provision for GPIO’s, HW_SW_CTRL and REFSEL1.



    Regards,

    Sameeksh M Shetty

  • Hi Sameeksh, 

    There are no EEPROM/ROM configs stored on the chip that provides outputs close to the ones you listed above. The smallest output frequency is 100 MHz.

    What I am thinking you can do to get around this, have REFSEL utilize a input that is not available. This way upon power up, you have no output frequencies being generated; then you can program the device's EEPROM to store your desired configuration. If there is no input available, the PLL will be unlocked and thus the outputs should be muted. 

    Also, can you attach a pdf, the picture attached is very blurry

    Regards, 

    Vicente

  • Hi Vicente,

    I will upload the pdf in a day or two, currently I am not having access to that machine. 

    Continuing the discussion , the method you suggested is very well thought, I will give it a try. I think this will be a correct way to proceed during the first power cycle of my board.
    Once this part is done, I am planning to write the configurations to the first page of EEPROM using TICS software. For the clock generator IC , to pick this page , what should be the states of HW_SW_CTRL, REFSEL1 and GPIO[5:0]?

    Since I want the IC to pick the page from EEPROM, I need to keep HW_SW_CTRL =1
    And there is a primary reference clock connected to the IC, and in this case INSEL_PLL will be selected in TICS pro. So REFSEL1 wont be required.

    But what should be the states of GPIO[5:0]? Can you pls guide me how each page of the EEPROM can be chosen based on GPIO.

    Regards,
    Sameeksh

  • Hi Sameeksh, 
    No problem I understand.

    Once you have powered up, to pick page 1 of EEPROM, follow the steps listed below under the programming section of the LMK03318 DS: 

    R145[3:0] should be set to 1'b to select page1. 

    GPIO pins are checked on power up only to choose which EEPROM/ROM config to load. Once the device is on, you can program it as outlined above. 

    Regards, 

    Vicente 

  • Once you program EEPROM page 1, say you always want to load this config upon a power cycle refer to this table below: 

    HW_SW_CTRL = 0 ; GPIO[3]= LO ; GPIO[2] = MID

    Regards, 

    Vicente