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.

LMK04368-EP: Incorrect Clock Frequency Output

Part Number: LMK04368-EP
Other Parts Discussed in Thread: LMK04828

Tool/software:

Hi, 

I'm trying to use this LMK part in a single-loop zero delay configuration. After programming I have a 300MHz sine coming into the OscIN port which should be compared with CLKOut8 within PLL2. However, it looks like I consistently get a clock output around 307 instead of the 300MHz I expect. I'm sure it's something silly I'm doing on the eval board but any help would be greatly appreciated. 

Attaching my latest TISC and registers. 

Thanks!

R0 (INIT)	0x000090
R0	0x000010
R2	0x000200
R3	0x000306
R4	0x0004D1
R5	0x000563
R6	0x000670
R12	0x000C51
R13	0x000D04
R256	0x010064
R257	0x01010A
R258	0x0102C0
R259	0x010350
R260	0x010410
R261	0x010500
R262	0x010601
R263	0x010711
R264	0x01080A
R265	0x010908
R266	0x010A00
R267	0x010B00
R268	0x010C00
R269	0x010D00
R270	0x010E01
R271	0x010F11
R272	0x011064
R273	0x011100
R274	0x011200
R275	0x011300
R276	0x011400
R277	0x011500
R278	0x011601
R279	0x011711
R280	0x011864
R281	0x011900
R282	0x011A00
R283	0x011B00
R284	0x011C00
R285	0x011D00
R286	0x011E01
R287	0x011F11
R288	0x01200A
R289	0x012100
R290	0x012200
R291	0x012300
R292	0x012400
R293	0x012500
R294	0x012601
R295	0x012711
R296	0x012864
R297	0x012900
R298	0x012A00
R299	0x012B10
R300	0x012C00
R301	0x012D00
R302	0x012E01
R303	0x012F00
R304	0x013064
R305	0x013100
R306	0x013200
R307	0x013310
R308	0x013400
R309	0x013500
R310	0x013601
R311	0x013700
R312	0x013821
R313	0x013900
R314	0x013A00
R315	0x013B00
R316	0x013C00
R317	0x013D00
R318	0x013E00
R319	0x013F23
R320	0x01408B
R321	0x014100
R322	0x014200
R323	0x014300
R324	0x0144FF
R325	0x014500
R326	0x014608
R327	0x01470F
R328	0x01481B
R329	0x014933
R330	0x014A03
R331	0x014B06
R332	0x014C00
R333	0x014D00
R334	0x014EC0
R335	0x014F7F
R336	0x015001
R337	0x015102
R338	0x015200
R339	0x015300
R340	0x015478
R341	0x015500
R342	0x015678
R343	0x015700
R344	0x015896
R345	0x015900
R346	0x015A78
R347	0x015BD4
R348	0x015C20
R349	0x015D00
R350	0x015E1E
R351	0x015F0B
R352	0x016000
R353	0x016101
R354	0x0162B0
R355	0x016300
R356	0x016400
R357	0x016502
R358	0x016600
R359	0x016700
R361	0x016950
R362	0x016A20
R363	0x016B00
R366	0x016E13
R371	0x017310
R375	0x017700
R386	0x018200
R387	0x018300
R388	0x018480
R389	0x018500
R392	0x018800
R360	0x016801
R1365	0x055500
LMK04368-EP Settings_FINAL.tcs

  • It seems to me that this configuration should lock. I do see that the charge pump is set to 1600uA gain as opposed to 3200uA default gain, but this may be appropriate depending on the loop filter used. PLLatinum Sim suggests the default loop filter on the EVM should be stable with 1600uA gain, so unless you modified the loop filter I don't think this is the issue (I'm happy to double-check if you did modify it).

    You are providing 300MHz sine wave in on OSCIN. Did you also disable the on-board VCXO? Otherwise there's usually a very loud 122.88MHz interference signal coupled into OSCIN, even when the VCXO is not connected. You can depopulate R73 or FB12 to remove power from the VCXO, which will eliminate any chance of interference.

  • Hey Derek, 

    I depopulated just to be safe and no change. Can you clarify the sequence here; 

    On our actual part, we push the following register writes off POR and seem a similar issue. Are we following the proper sequence? 

    {0x0000, 0x80}, // RESET=1 (Reset)
    {0x0108, 0x0A}, // DCLK2_3_DIV=10 !!UPDATED TO 10
    {0x010A, 0x00}, // CLKout2_3_PD=0 (Enabled)
    {0x010F, 0x11}, // CLKout3_FMT=1 (LVDS), CLKout2_FMT=1 (LVDS)
    {0x0110, 0x0A}, // DCLK4_5_DIV=10 !!UPDATED TO 10
    {0x0112, 0x00}, // CLKout4_5_PD=0 (Enabled)
    {0x0117, 0x11}, // CLKout5_FMT=1 (LVDS), CLKout4_FMT=1 (LVDS)
    {0x0118, 0x0A}, // DCLK6_7_DIV=10 !!UPDATED TO 10
    {0x011A, 0x00}, // CLKout6_7_PD=0 (Enabled)
    {0x011F, 0x11}, // CLKout7_FMT=1 (LVDS), CLKout6_FMT=1 (LVDS)
    {0x0120, 0x0A}, // DCLK8_9_DIV=10 !!UPDATED TO 10
    {0x0122, 0x00}, // CLKout8_9_PD=0 (Enabled)
    {0x0127, 0x11}, // CLKout3_FMT=1 (LVDS), CLKout2_FMT=1 (LVDS)
    {0x0138, 0x21}, // VCO_MUX=1 (VCO 1), OSCout_FMT=1 (LVDS)
    {0x013F, 0x23}, // PLL2_NCLK_MUX=1 (Feedback Mux), FB_MUX=1 (CLKOUT8)
    {0x0140, 0x8F}, // VCO_LDO_PD=0 (Normal operation), VCO_PD=0 (Normal operation), SYSREF_GBL_PD=1 (Power down), SYSREF_PD=1 (Power down), SYSREF_DDLY_PD=1 (Power down), SYSREF_PLSR_PD=1 (Power down)
    {0x0143, 0x11}, // SYNC_EN=0 (Disabled)
    {0x0144, 0x1E}, // SYNC_DIS[2,4,6,8]=1
    {0x0146, 0x00}, // CLKin1_EN=0 (Not enabled for auto mode), CLKin0_EN=0 (Not enabled for auto mode)
    {0x0148, 0x1B}, // CLKin_SEL0_MUX=3 (DAC Locked), CLKin_SEL0_TYPE=3 (Output (push-pull))
    {0x0149, 0x33}, // CLKin_SEL1_MUX=6 (SPI Readback), CLKin_SEL1_TYPE=3 (Output (push-pull))
    {0x014A, 0x03}, // RESET_MUX=0 (Logic Low), RESET_TYPE=3 (Output (push-pull))
    {0x015F, 0x0B}, // PLL1_LD_TYPE=3 (Output (push-pull))
    {0x0161, 0x01}, // PLL2_R=1 !!Updated to 1
    {0x0162, 0x50}, // OSCin_FREQ=4 (>255 MHz to 500 MHz), PLL2_REF_2X_EN=0 (Doubler Disabled)
    {0x0165, 0x32}, // PLL2_N_CAL=50
    {0x0173, 0x10}, // PLL2_PRE_PD=0 (Normal Operation), PLL2_PD=0 (Normal Operation)
    {0x0168, 0x01}, // PLL2_N=1
    {0x0169, 0x50}, // PLL2_CP_GAIN=2 (1600 uA)
    {0x016E, 0x13}, // PLL2_LD_MUX=2 (PLL2 DLD), PLL2_LD_TYPE=3 (Output (push-pull))
    {0x0555, 0x00} // SPI_LOCK=0 (Registers unlocked)
    };

  • The write to PLL2_N (0x168) should happen after the write to PLL2_CP_GAIN (0x169), since calibrating the PLL while the charge pump gain is changing can produce strange results. I am in the process of pushing for the programming sequence instructions to be clarified to indicate that 0x168 should be written after everything else, to trigger the VCO calibration once the power stabilizes in all the internal LDOs and once the loop-affecting registers have settled. I'd also suggest inserting a pause between the PLL2_N write and the other writes to allow for that settling time, or else write 0x168 again after a few milliseconds and see if that puts it in lock.

    PLL2_N_CAL = 50 (0x165 = 0x32) should be PLL2_N_CAL = 5 (0x165 = 0x05), presuming PLL2_P is left at the default value of 2.

    You should probably set PLL2_WND_SIZE = 1 (0x169 = 0x30 instead of 0x50) since the phase detector is operating above 240MHz.

    You might want to set SPI_3WIRE_DIS = 1 (0x0 = 0x90) if your SPI bus can't handle LMK04368-EP attempting to drive SDIO as an open-drain line during readback. 3-wire and 4-wire readback can happen simultaneously. Of course, this only matters if you attempt to read back from the LMK04368-EP.

    The rest looks accurate to me...

    ---

    If those cleanup items don't help, the next thing I'd check is whether the R and N ports are actually seeing the expected signals at the expected frequencies. You can configure PLL1_LD_MUX and PLL2_LD_MUX to output a divide-by-4 of the input to the R port and the N port at the phase detector, which can be probed to ensure the clocks into the phase detector are doing what you expect. This can sometimes help identify nonmonotonicity issues if you have a strange/astable R/N signal.

    What is the amplitude of the 300MHz sine wave? Is it being properly terminated? The VCXO signal normally on OSCIN is too large amplitude for the OSCIN port, so there is a resistive attenuator to reduce the amplitude - if this resistive attenuator (the 100Ω R61) has a path through the AC-coupling capacitor to the OSCIN network, and you're providing 300MHz on OSCIN_N, this might be affecting signal integrity or amplitude even with the VCXO disabled.

  • AFAIK the signal is terminated properly. This is just a ~-10dBm sine at that frequency. 

    I did attempt to clean up the registers to seemingly no effect

  • -10dBm might be too low for the OSCIN input receiver - I believe that's about 200mVpp, which is just barely at the minimum of our input signal swing requirements. Does it lock with a 0dBm signal?

  • No, not getting any lock on the board and I still get this ~307MHz output regardless of whether something is on the OSCin or not. 

  • Nothing else is jumping out at me. I'm going to try to replicate your setup on an EVM and get it to lock - I'm currently away from the lab but I'll be back in tomorrow. Apologies for the delay.

  • {0x0162, 0x50}, // OSCin_FREQ=4 (>255 MHz to 500 MHz), PLL2_REF_2X_EN=0 (Doubler Disabled)

    I think this is the problem. After testing in the lab, I find that OSCin_FREQ = 3 is the correct setting, not OSCin_FREQ = 4.

    You are forgiven for assuming this is the correct setting, because the datasheet claims this is the correct setting:

    However, this is actually completely wrong! OSCin_FREQ is a two-bit field spanning 0x162[3:2], and the behavior claimed in the datasheet to belong to "4" actually belongs to "3"; it turns out 0x162[4] is an unrelated bit that attempts to align PLL1_R with PLL1_N when exiting holdover, which ultimately ended up undisclosed as it didn't behave the way we anticipated. It seems that whoever updated this datasheet just copied the behavior of the OSCin_FREQ field from LMK04828, where this field appears to behave according to the documentation snippet.

    Try writing 0x0162 = 0x4C, which sets PLL2_P = 2 the same as before, OSCin_FREQ = 3, PLL2_REF_2X_EN=0 the same as before, and disables the undisclosed function. I find that the PLL locks when I do this.

  • Thanks! I found an alternate config that is giving me lock but will make a note in case we need to do more troubleshooting. Thanks for the help!