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.

LMX2594EVM: Problems with Digital Interface / Set a Frequency

Part Number: LMX2594EVM
Other Parts Discussed in Thread: LMX2594, USB2ANY

Hello,

i tried to control the LMX via phyton script on a Raspberry Pi. For this i connected the Raspberry Pi GPIO Pins with the digital interface of the LMX. To be excat the lines are connected to CSB_TP, SDI_TP, SCK_TP (LMX2594 EVM Instructions – 15-GHz Wideband Low Noise PLL With Integrated VCO, Site 13, Schematic). After checking the timing characteristics which i considered in the phyton script and checking the voltage levels of all lines during the transmission with an oscilloscope i dont have other ideas for mistakes. Note: I used the same script before to control a signal generator from analog devices which had the same transmission characteristics and it worked fine. Do you have any ideas why there is no reaction by the LMX?

  • Hello Marcus,

    Have you used the Ticspro first to make sure that the board works normally?

    Regards,
    Hao
  • Hello Hao,

    thank you for quick response, it was easy to fix. I just did not send left-hand zeros, which was the mistake. Now i am working on the problem that sometimes the LMX does not set the frequency correctly (init sequence), although i followed the steps in the data sheet. I guess i can solve it by checking the register values using readback. But i wonder why the TCIS software sends with relative slow speed compared to the limit values (timing requirements, about 400 times less). Is there a special reason for that?

  • Hi Marcus,

    Ticspro/USB2ANY is a general tool for all our LMX/LMK products. Its purpose is to configure the parts correctly, so data transmission speed is not the focus. The SPI transmission speed is tested separately.

    Regards,

    Hao

  • Hi,

    i still have trouble with the communication. For initialize sequences and frequency update sequences the same issue that sometimes the LMX does not react or does something wrong. I did not check the registers with a readback because i think it wont solve my problem. I only checked the register values which i submitted. I want to perform a frequency sweep from 50 MHz to 15 GHz. If the frequency update sequence update was not successful one time it is impossible to repeat it successfully. Before i can use a update sequence again i have to send a initalize sequence. Assumed i can recognize a not successful update sequence by checking the register values this means i have to start again from a frequency where i stored values for all registers. Since this is not the solution i will choose i have to find out whats wrong with the communication. Do you have some ideas again? The board works fine with Tcispro.

  • Hi Marcus,

    I'm still trying to understand the question. Do you mean that you cannot communicate with the device at all (SPI issue)? Or it's just that you cannot change the frequency after following the '7.5.2 Recommended Sequence for changing frequencies' in the datasheet?

    Can you at least successfully load the TI default registers using your own microcontroller?

    Regards,

    Hao

  • Hi Hao,

    the communication works, i can set a frequency at first with stored register values (all registers) from tcispro and after that i can change a frequency following the '7.5.2 Recommended Sequence for changing frequencies' in the datasheet. But the frequency change doesnt work always. If it was not successful i have to set a frequency with stored register values first and then i can change the frequency again. Also, it is not always successful to set a frequency with stored registers from tcispro (initialization). So i assumed that it is still something wrong with the communication, since i checked the values i sent to the LMX.

    What do you mean with "TI default registers"?

  • Hi Marcus, 

    How do you know that the frequency change is not successful? Do you look at the spectrum analyzer, observe the green light on the board or use lock detect readback? 

    You said that it sometimes didn't work. Did you find a pattern when it's not working? For example, changing from frequency A to frequency B it never locks. If you can reproduce the failure every time, did you try using Ticspro to do the same? This is to make sure that it's only due to bad communication and not anything else.

    You can find a console window at bottom left of Ticspro. It tells you what registers are written according to what you did on the GUI. For example, after changing the frequency on the GUI, several registers are written to the device. Make sure that your own code align with what Ticspro says.

    By TI default I mean the default mode in Ticspro.

    Regards,

    Hao

  • Hi Hao,

    i can see the signal on the spectrum analyzer. Yes, i can store the default registers from Ticspro and do a Recommened Inital Power Up Sequence successful. I also can do that after changing the frequency in the Ticspro GUI for any frequency (export hex register values again, send all registers with my controller). But it doesnt work always. It is completly random, so sometimes a full sweep (change the frequency to many different rising values) with stored register values from Ticspro is successful, sometimes it is not successful for some frequencies. But it is always another change which doesnt work (example: in the first sweep frequency A to B works,  frequency B to C doesnt work. next sweep try frequency A to B doesnt work,  frequency B to C works).

    It is the same behaviour (frequency sweeps like the example i wrote shortly before) if i do a Recommened Inital Power Up Sequence and than changing the frequency with Recommened Sequence For Changing Frequencies. In this case i do not use stored register values from Ticspro to change a frequency, instead my controller calculates the values for N Divider, PLL numerator and denominator and chooses values for OUT_A_MUX (Output: Channel Divider or VCO) and CHDIV (Select Channel Divider). Following values are sent in this order to change the frequency from any frequency to 7000MHz:

    0x2dc0df  (R45, set OUT_A_MUX)

    04b0800  (R75, set CHDIV)

    0x240046  (R36, set PLL_N)

    0x2b0000  (R43, set PLL_NUM)

    0x270001  (R39, set PLL_DEN)

    0x00251c  (R0, FCAL_EN = 1)

    The values are the same like the default register values (also RFoutA = 7000 MHz), except R39 is 0x2703E8 which should be not relevant since the numerator is zero. (0/1 = 0/1000)

    How to change the frequency with the Ticspro GUI? If I edit the value in the RFoutA field and press enter the frequency changes to a wrong frequency. It only sets the correct frequency if I press "Write All Registers".

  • Hi Marcus,

    To change the frequency of RF output A, you need to first type in the frequency, hit enter, then toggle the FCAL_EN, which is short for frequency calibration enable. If you don't toggle that bit, VCO calibration will not run.

    Please try this and see if you can at least get things to work in Ticspro, before moving on to use your own controller.

    Regards,

    Hao

  • Hi Hao,

    i can change the frequency with Ticspro GUI like you told me any number of times without any problems. 

    To change a frequency my controller writes the same values as Ticspro do, execpt following:

    - Ticspro does not write values which are equal to the existing values, EXCEPT 0x220000. This register my controller doesnt write any time changing the frequency because it is loaded with 0000 during Recommened Inital Power-Up Sequence and keeps being zero

    - Ticspro does write zeros in R42 or R38, when R43 or R39 written with new values. My controller do not write values in R42 or R38 because i just need PLL_NUM/PLL_DEN = 0/1 and PLL_NUM/PLL_DEN = 1/2

    - as said before my controller uses values PLL_NUM/PLL_DEN = 0/1 and PLL_NUM/PLL_DEN = 1/2 instead of PLL_NUM/PLL_DEN = 0/1000 and PLL_NUM/PLL_DEN = 500/1000 which Ticspro GUi use

    Please do remember that i have the same behaviour if i change frequencies or write default registers multiple times with "Recommened Inital Power-Up Sequence". In this case i just change the reset bit to 1, then to 0, then write R112...R0 and then R0 again (0x00251C). 

  • Hi Marcus,
    It seems that you did nothing wrong. There is no need to program R34(0x22) if it is always 0 and you at least programmed it once during initialization. I think that something else is missing. Did you toggle the FCAL_EN bit in your script?
    Regards,
    Hao
  • Hi Hao,

    yes, i edited my script that it sends 0x2514 (FCAL_EN=0) before 0x251C (FCAL_EN=1), but that makes no difference.

    Is it possible to change this post from "Resolved" to "Not Resolved"?

  • Hi Marcus,

    I couldn't think of any other reason because it seems that you've done everything right. Have you tried to read back the registers when it does/doesn't lock and compare the two?

    Also, what's the clock frequency you are using? Can you slow down the clock speed and/or add delays between commands to see if the speed matters?

    Regards,
    Hao
  • I'm not sure how to change the post to 'Not resolved'. I didn't find a way to do it on my end. Maybe you can just 'ask a related question'.
  • Hi Hao,

    yes, i did slow down the speed in various ways: set a big delay between registers, between bits (5ms).

    I do not have a routine for readback yet. Is it possible to read back the registers with Ticspro? I would set a frequency with my controller and read back with Ticspro afterwards. I dont think so because of following steps:

    1. i set a frequency with Ticspro

    2. disconnect USB2ANY from the board

    3. set another frequency in Ticspro

    4. connect USB2ANY to the board again

    5. read back the register i changed in step 3

    6. Ticspro console window always says there is "no difference" and "read as value". This value is in the programm currently (which can see it in "Raw Registers", set with step 3), but actually it can not be in the register of the LMX?

    Also Ticspro console window tells me the same if click on "Read" or "Read Register" and even USB2ANY is not connected to the board.

    What i experienced additionally is that even Ticspro didnt successfully "Write All Registers" or just change the frequency by toggling FCAL after i changed the frequency and hit Enter. But it is very rare and that is the reason i did not have that before. I could not change the frequency from 2000 to 2050 MHz for 3/10 times. After that i could not reproduce it. It was more than 50 times successful.

    With my controller it is about 2/10 times not successful.

  • Hi Marcus,

    Yes I agree that it is confusing that Ticspro reads back things even when it's not connected. However, if it is connected to a valid device, it does read back useful information.

    For example, I did exactly what you said. I get the PLL to lock at 7GHz, unplug the ribbon header from LMX2594, change the frequency to 8G, connect the ribbon back and readback. There are different values: 

    Make sure that the connection is good when you readback, otherwise it reads back the same things.

    When reading back, pay attention to these registers, as they give information of whether the device is locked and how it is locked. For details of these registers, please refer to the datasheet.

    After you're able to read back registers, try comparing the readback registers when the frequency switching is successful and unsuccessful, and see if you can find any clue.

    Regards,

    Hao

  • Hi Hao,

    i managed to do a readback with Ticspro and cloud see that some registers have wrong values. But it seems like i finally could solve the problem by using the voltage supply from my controller (Raspi) and not a external voltage supply! Just now it set many many frequencies successful and zero unsuccessful. Many thanks for your help!


    Regards,

    Marcus

  • This is good to know Marcus.

    Regards,
    Hao