# Xrfclk configuration | LMK04828 | Using external 10MHz reference clock

**URL:** <https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562>\
**Category:** Support\
**Created:** [May 8, 2023, 9:32pm UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562 "2023-05-08T21:32:36Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbhopi94](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@kbhopi94](https://discuss.pynq.io/u/kbhopi94)\
**Post date:** [May 8, 2023, 9:32pm UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/1 "2023-05-08T21:32:37Z")

</div>

Hello,  
I am working on RFSoC4x2 (Gen3 XCZU48DR) with PYNQ version 2.7.0 and vivado 2020.2

My primary requirement is to configure LMK04828 chip onboard to take external 10MHz ref clock input and produce 245.76MHz to feed to LMX2594 chip which, in turn, is generating 409.6MHz. I did generate .tcs (and .txt) configuration file for the same and added the corresponding .txt file (i.e. LMK04828\_245.76.txt) in xrfclk package in JupyterNotebook environment (path: /usr/local/share/pynq\_venv/lib/python3.8/site-packages/xrfclk). Also, I am setting these clocks using command  
xrfclk.set\_ref\_clks(lmk\_freq=245.76,lmx\_freq=409.6)

Now the problem is- My design is working even when I am not feeding the external clock to the board which means it’s definitely taking driving\_clock from other input pin and I can’t figure out which one .

Could you please guide and help me resolve this issue?

Here is my hex register (.txt) file for the reference and also some snaps which might be helpful for you to understand the issue more clearly.

[LMK04828\_245.76\_clkin1\_disabled.txt](https://discuss.pynq.io/uploads/short-url/dj5gXD7JJvVaMpY8G5gYWkOVfZ2.txt) (2.0 KB)

 ![tics1](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/2/27ae7fb35df5ba75219e38a7c567b5768a019378.png)  
 ![tics3](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/1/105858410c7a678b68662218ab78da9e496a63af.png)  
 ![tics2](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/5/59611846f277495624d0a816229e8d208314e770.png)  
 ![txt_files_xrfclk](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/6/61ea2c4bc036ea537334da8005837b6cf937b88a.png)

---

<div class="post-metadata">

**Author:** ![kbhopi94](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@kbhopi94](https://discuss.pynq.io/u/kbhopi94)\
**Post date:** [May 8, 2023, 9:37pm UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/2 "2023-05-08T21:37:06Z")

</div>

The hex reg file uploaded for the reference has name for personal reference. I rename it and follow standard naming convention when I add that file to xrfclk package.

---

<div class="post-metadata">

**Author:** ![njachimi](https://avatars.discourse-cdn.com/v4/letter/n/22d042/32.png) [@njachimi](https://discuss.pynq.io/u/njachimi)\
**Post date:** [May 14, 2023, 12:44am UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/3 "2023-05-14T00:44:00Z")

</div>

The RFSoC4x2 provides SYNC to each of the LMX chips. From the schematics the LMX\_ADC accepts this at SD\_CLK\_OUT1 and LMX\_DAC at SD\_CLK\_OUT5. I suggest you contact TI tech support to configure your TICS projects for the settings you need, however, I can point out a few features to notice…

What you will need to do is to set the LMK04828B’s CLKin0 to drive the SYSREF Mux.

![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/3/3a602a8cffd9368a0b48f8cef841260baa86df95.png)

You were on the right track with the SYNC/SYSREF, but just needed to change the value here:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/9/996e56ad0157e1740405fe8177d41f16df77f142.png)

The TICS GUI is not updating certain things it seems. And I was not able to get the 10MHz reference clock from CLKin0 to drive out the LMXs at the right outputs. So I would reach out to TI support to guide you further on this.

Regards,

Nathan

---

<div class="post-metadata">

**Author:** ![JennySmith888](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/jennysmith888/32/1966_2.png) [@JennySmith888](https://discuss.pynq.io/u/JennySmith888)\
**Post date:** [May 14, 2023, 7:10pm UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/4 "2023-05-14T19:10:09Z")

</div>

@kbhopi94 Please provide an update if you are able to get it working. I will need to do this eventually too. I have been experiencing some challenges with the LMK chip on the RFSoC4x2. I also produced a custom file in TICs and programmed the chip with it and it’s not behaving as expected. I talked to Texas Instruments support and they verified the file was correct and they were able to use it to program an LMK04828 eval board and get the correct clock outputs. The eval board for the LMK is a different board design than the RFSoC4x2 so I’m currently combing through that to see if I can figure out the discrepancy. I’ll let you know if I figure anything out.

---

<div class="post-metadata">

**Author:** ![JennySmith888](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/jennysmith888/32/1966_2.png) [@JennySmith888](https://discuss.pynq.io/u/JennySmith888)\
**Post date:** [May 14, 2023, 10:18pm UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/5 "2023-05-14T22:18:56Z")

</div>

@kbhopi94 I just discovered I’m not programming the device correctly and that’s why it’s not behaving. I’m still looking for the error but it seems like it’s programming the chips with the default hex files that ship with the PYNQ image instead of the hex file I directed it to. This may be what’s happening to you as well.

---

<div class="post-metadata">

**Author:** ![kbhopi94](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@kbhopi94](https://discuss.pynq.io/u/kbhopi94)\
**Post date:** [May 15, 2023, 4:45am UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/6 "2023-05-15T04:45:55Z")

</div>

Hi Jenny,

Even I gave it a thought but I literally replaced their LMK04828\_245.76.txt file (which I suppose takes input from CLKin\_1 pin) with mine and I even confirmed whether the changes I made in a replaced file in xrfclk package are getting reflected by checking (and by changing frequency couple of times) unloaded SMA pin (i.e. SDCLKout11) and it’s working. This means it’s definitely reading the file given by me BUT most probably I am not configuring it right to take 10 MHz input from CLKin\_0 pin. I will give an update if I get it working.

Cheers,  
Kalyani

---

<div class="post-metadata">

**Author:** ![kbhopi94](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@kbhopi94](https://discuss.pynq.io/u/kbhopi94)\
**Post date:** [May 15, 2023, 4:50am UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/7 "2023-05-15T04:50:20Z")

</div>

@njachimi  
TI support would be highly appreciated. I will also try to reach out to them. I will see if making the changes you suggested will make it work and update you at the earliest. Thanks!

---

<div class="post-metadata">

**Author:** ![kbhopi94](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@kbhopi94](https://discuss.pynq.io/u/kbhopi94)\
**Post date:** [May 15, 2023, 4:51am UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/8 "2023-05-15T04:51:37Z")

</div>

@JennySmith888 Meanwhile would you mind sharing your tics (.tcs) file and I can see if I can make it work.

Cheers,  
Kalyani

---

<div class="post-metadata">

**Author:** ![kbhopi94](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@kbhopi94](https://discuss.pynq.io/u/kbhopi94)\
**Post date:** [May 15, 2023, 9:31pm UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/9 "2023-05-15T21:31:56Z")

</div>

@njachimi

Well, I don’t understand one thing here from what you suggested. Changing CLKin0\_OUT\_MUX option to SYSREF\_MUX will block the path from CLKin0 to PLL1 which makes no sense to me as I am getting the desired output frequencies (245.76MHz) to drive LMX chips from PLL1&2 configuration. My requirement is to take ext ref clock of 10 MHz instead of board clock and generate 245.76 MHz frequencies to drive LMX chips. Thanks!

---

<div class="post-metadata">

**Author:** ![njachimi](https://avatars.discourse-cdn.com/v4/letter/n/22d042/32.png) [@njachimi](https://discuss.pynq.io/u/njachimi)\
**Post date:** [May 15, 2023, 11:21pm UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/10 "2023-05-15T23:21:39Z")

</div>

I first examining if I could use the 10MHz input on CLKin0 to be the SYSREF, but I wasn’t able to get it to route out clock distribution. I mentioned that and so what looks like the only option is then to use PLL1. What I haven’t gotten a clear answer on using TICs so I’m currently checking with TI support is how PLL1 steers the RFSoC4x2’s 160MHz VCXO and what settings should be given to PLL1. I’m trying to replicate the loop mode described in the LMK datasheet and shown below:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/f/f17cf3b79c9bd3e1cd6a974af77291555773b6c1.png)

and in TICS, PLL1 is fed from the 10MHz reference

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/3/3b4c6890121183ad67f06d0f948c6015119d1816.png)

My next concern is related to the LMX2549s’ that have SYNC inputs. I am not able to provide 10.0MHz. Our LMK04828 via PLL1 should be now using the 10MHz reference you would provide, so both LMX2549s will be provided in-phase clocks, however it would be likely then that a 9.99 or 10.03MHz reference would be sufficient so I would try initially while I can get some clarification from TI.

Regards,

Nathan

---

<div class="post-metadata">

**Author:** ![JasonPhysics](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@JasonPhysics](https://discuss.pynq.io/u/JasonPhysics)\
**Post date:** [June 6, 2023, 6:47am UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/11 "2023-06-06T06:47:21Z")

</div>

Any progress on this? I’d love to use a 10 MHz GPS disciplined oscillator to make a 10 MHz RF SYS REFCLK or SYSREF, along with a nice round sampling rate.

With the LMK, is it possible to use a 10 MHz Ext. Ref. Clk if it’s plugged in, and the 160MHz VCXO OSC IN otherwise? Or do you need to explicitly load one or the other configuration?

As a starting point, is there a repository for the original .tcs files that can be opened in the TICS Pro for RFSoC 4x2’s? For example, the .tcs files that generated LMK04828\_500.0.txt and LMX2594\_500.0.txt in [RFSoC-MTS/boards/RFSoC4x2/xrfclk at main · Xilinx/RFSoC-MTS · GitHub](https://github.com/Xilinx/RFSoC-MTS/tree/main/boards/RFSoC4x2/xrfclk) ?

To integrate with and compare to our other astronomy and instrumentation, round numbers and powers of 2 are nice. I’d love 4 GSPS or 5 GSPS. Even the Gen1 4096 MSPS makes nice FFT spectral bins that are 1 MHz wide and a RAM capture that is a microsecond long (or twice these or half of these or whatever). The obsession with 7.68, 122.88, 245.76, 491.52, and 3932.16 MHz seems to stem from the 300 Hz/baud Bell 103 modem from 1962. This factor of 3 seems to have seeped into all comms rates ever since.

Thanks,  
Jason

---

<div class="post-metadata">

**Author:** ![kbhopi94](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@kbhopi94](https://discuss.pynq.io/u/kbhopi94)\
**Post date:** [June 6, 2024, 6:49pm UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/12 "2024-06-06T18:49:20Z")

</div>

Apologies to post this late –

But yeah, I happened to talk to TI people first who suggested few things to try to see if design crashes with respective configuration. Here is the link to the thread – [LMK04828: taking driving\_clock from another input pin and I can’t figure out which one - Clock & timing forum - Clock & timing - TI E2E support forums](https://e2e.ti.com/support/clock-timing-group/clock-and-timing/f/clock-timing-forum/1229913/lmk04828-taking-driving_clock-from-another-input-pin-and-i-can-t-figure-out-which-one/4661353#4661353)  
and it worked.

Also, after talking to casper guys about using external clock on rfsoc4x2, they provided me the required clock configuration file (.hex) file which is attached below and it works for me.

[rfsoc4x2\_lmk\_CLKin0\_extref\_10M\_PL\_122M88\_LMXREF\_245M76.txt](https://discuss.pynq.io/uploads/short-url/8ci6luATz43WMI4FPoXyQtlYtzx.txt) (2.0 KB)

---

<div class="post-metadata">

**Author:** ![ahde78](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@ahde78](https://discuss.pynq.io/u/ahde78)\
**Post date:** [June 10, 2024, 1:14pm UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/13 "2024-06-10T13:14:17Z")

</div>

Dear Kalyani,

I tested my implementation with the file that you provided, and now it’s working. Thanks a lot for your help.

Best wishes,  
Alireza

---

<div class="post-metadata">

**Author:** ![ponnanna](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@ponnanna](https://discuss.pynq.io/u/ponnanna)\
**Post date:** [March 3, 2025, 12:08pm UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/14 "2025-03-03T12:08:51Z")

</div>

Hello @kbhopi94  
Greetings…

I was following your post here as I also ended up with the same problem.  
In the end you mentioned that you directly got the HEX file to load for your specific case. But could you tell me what was the actual problem? Was it a wrong settings for the LMK in the TICS pro app? OR should I also just need to talk to TI guys for my specific case?

Meanwhile I also used your working [rfsoc4x2\_lmk\_CLKin0\_extref\_10M\_PL\_122M88\_LMXREF\_245M76.txt](https://discuss.pynq.io/uploads/short-url/8ci6luATz43WMI4FPoXyQtlYtzx.txt) file for the LMK PLL on Xilinx CLK104 board and I could see that PLL still generates 245.76MHz even if the reference clock is still missing at CLK0 input.

Thanks!

Best Regards  
Ponnanna

---

<div class="post-metadata">

**Author:** ![kbhopi94](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@kbhopi94](https://discuss.pynq.io/u/kbhopi94)\
**Post date:** [March 7, 2025, 11:03pm UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/15 "2025-03-07T23:03:01Z")

</div>

Hi,

There are few settings regarding holdover and other stuff when you write clock config file in tics pro and for me those were set to default. I had to make those changes as per suggestions provided by TI people (you can follow my TI thread posted above) and it just worked. But to be on safer side, I am using the hex file provided by casper people as that pretty much getting me my job done!

It’s better you talk to them for your case and they should be able to help you! I am not familiar with CLK104 card. If the clock synthesizer chip is same, it should techincally work.

---

<div class="post-metadata">

**Author:** ![ponnanna](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@ponnanna](https://discuss.pynq.io/u/ponnanna)\
**Post date:** [March 10, 2025, 8:56am UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/16 "2025-03-10T08:56:21Z")

</div>

Hello,  
Thanks for your answer. Meanwhile, I also reached out to TI Forum and got support there as well.

Posting the Reply from TI support in case it helps someone else with the same problem:

_Are you testing this with an evaluation module? If so, can you tell me whether the LEDs indicate lock for both PLLs? As I imagine it, the LED corresponding to PLL2 should be lit up, and the LED corresponding to PLL1 should not. This is behaving as expected. PLL2 is turned on because the output of the external VCXO (160 MHz) is phase synchronized with the frequency of the on board VCO (3000 MHz). It will generate an output even without an input. However, your intended use is to make the phase relationship between the input and output of the device deterministic - which can only be achieved if you drive the input with the specified 10 MHz signal. \*  
If you do not want an output signal, set the corresponding clock outputs to powerdown mode._

So, in my case the board is CLK104 from Xilinx. I confirmed that PLL1 of LMK was not locked as long as the external ref clock was not provided via the SMA. The PLL1 was locked once the ref clock was supplied. The on-board LEDs on CLK104 can be used to verify this behavior and this is inline with what is explained above(TI Forum reply).

regards  
Ponnanna

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/system/32/2_2.png) [@system](https://discuss.pynq.io/u/system)\
**Post date:** [March 13, 2025, 8:56am UTC](https://discuss.pynq.io/t/xrfclk-configuration-lmk04828-using-external-10mhz-reference-clock/5562/17 "2025-03-13T08:56:47Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
