I have recently started developing a project on RFSoC2x2. I am doing baremetal development (not using PYNQ). In the design, I need to configure the DAC and ADC clock sources (LMX and LMK) from PS in Vitis.
I have found a similar application code (xrfdc_clk.c) which is for ZCU111, and changed some parameters that were different from ZCU111 to RFSoC2x2 such as I2C addresses. However, the clocks do not seem to be programmed after loading the bitstream and running the application. My guess is that the set of registers I am using to configure the LMK and LMX ICs is not correct.
Does anyone have any example source code that could be used as a reference for programming the clock ICs on the RFSoC2x2?
Any help is greatly appreciated.
P.S. The LMK reset is kept low in the block design.
I’m not aware of any baremetal applications I could point you to, but this is the package from the PYNQ repo that is used for LMK and LMX clock programming for RFSoC2x2-PYNQ. Hope it gives some hints at least…
Awesome! Thanks Shawn! This was exactly what I was looking for. Based on this, I developed a baremetal design and application by which the RF clocks were programmed successfully.
Hello ealian, I am attempting to do the same as you, and program the LMX and LMK clocks through Vitis. I started with the ZCU111 example code from xrfdc_clk.c as well, and have looked at the pynq repo, but the clocks still do not appear to be working. I was wondering if you could share with me how you were able to get your code to work.
Hi maurice, sorry for the late reply.
The I2C addresses in the RFSoC2x2 are different than ZCU111. You need to figure out the path and addresses by following the board’s schematics. Also, you need to get the register values from the TICS Pro software. Attached is a sample code that programs the LMK and LMX clocks for 500 MHz. You can change the values for your desired clock frequency. If you see the D22-D25 LEDs are on, then the clocks are programmed
Hope this will help.
rfclk.c (10.7 KB)