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.

LMX2571EVM: LMX2571 Mux Read Out

Part Number: LMX2571EVM
Other Parts Discussed in Thread: USB2ANY, LMX2571

Hi there,

I'm connecting the LMX2571EVM to an Adafruit USB to SPI Host. I'm using the USB2ANY pins on the EVM and connecting them to my host. VCC_3 is receviing power. I think I'm able to write correctly to the chip using SPI, as I can get the PLL Lock Output to toggle and also notice that when I power down, the current drops from 50mA to 42mA. However, I'd like a way to read what I wrote in the register and verify that.

I'm unable to do so and am not sure what mode the device is stuck. I'm following the directions to set initialization registers but not sure if these are correct? Any guidance here would be helpful

I'm trying to read register 60 in a loop after this sequence and always reading FFFF. The scope shot is attached below 

lmx = LMX2571(cs=4, frequency=50E3, url='ftdi://::ADAFRUIT-SPI/1')
lmx.open()

lmx.write_reg(0,0x203F)
lmx.write_reg(60, 0xA000)
lmx.write_reg(58, 0x8C00)
lmx.write_reg(53, 0x7806)
lmx.write_reg(39, 0x11F6)
lmx.write_reg(23, 0x1084)
lmx.write_reg(7, 0x1084)
lmx.write_reg(0,0x003F)
lmx.write_reg(39, 0x11F0)


lmx.write_reg(39, 0x11F8)


#lmx.write_reg(0, 0x603F) #Resets

while True:
lmx.read_reg(60, True)
sleep(1)


MOSI: Blue
Clk: Yello
MISO: Purple:
CS (LE): Green

Thanks for the help! 

  • Hi Nik,

    I think the powerdown current should be much lower than 42mA, please check again.

    To readback, you should make R39[3] = 0. 

    Your write waveform looks good, maybe you just did not program R39[3] = 0.

    Try again with the following procedure:

    1. power up the EVM

    2. Readback R60, you should get 0x4000

  • Hi Noel,

    I've got the readback to work and able to read 0x4000 (and couple other defaults) correctly. I noticed the issue was that R52 was not soldered onto EVM so the MISO pin was probably getting coupled to data /clock.

    I'm facing another issue now, which may or may not be related to EVM or uWire. I have a system which I need to integrate the LMX2571 into which contains 4-5 other SPI devices hanging off the same bus being controlled by a SPI Master. I prototyped this by hooking up SCLK, MOSI, MISO to my external board which contains the other 5 SPI slaves devices along with sharing with LMX2571 uWire interface (CLK, DATA, MUXOUT) respectively on the same bus. 

    At this point I'm looping readback in Python to ensure that I can read 0x4000 properly when communicated. However, as soon as I start sharing SCLK between the LMX EVM and the the rest of my system (with the other 5 slaves) I noticed that I was unable to readback. As soon I removed clock between host and slave system, while still leaving it connected to LMX, I noticed I could readback again.

    Upon examining this further, I notice this may be a Slew rate issue on the clock side. 

    Below Slew is clock removed between host and slave system, only connected to LMX, readback is successful (Vertical is 2V, Horizontal axis is 40ns)

    Below is slew rate of clock when connected to both slave system AND LMX (Vertical is 2V, Horizontal is 200nS). 

    I believe this error may be happening because of slow slew rate SCLK to LMX. Would you know how to increase slew rate? Can i remove the 1.8V voltage divider resistors on uWire on EVM side?

    In other words, would you have any best practices or some sort of reference to share this LMX uWire Interface with rest of system which contains traditional SPI slaves?

    Best,

    Nik

  • Hi Nik,

    The pictures were not get through, would you please resend the pictures?

  • Slow Rate:

    Fast Slew:

  • Hi Nik,

    Right, looks like the issue is due to poor edge rate. 

    The EVM includes voltage divider in the SPI interface in order to support old legacy 5V parallel LTP. They are not needed if your processor is 3.3V logic. 

  • Hi Noel,

    Thanks for your reply.

    Few comments:

    Would removing the voltage divider cause any noise issues on the SPI bus? (Can I just remove the resistors or would I still need some isolation resistors for the SPI signals). 

    Do you recommend pullups or pulldowns of any sort when sharing uWire with the SPI bus slaves? 

    Thanks!

    Nik 

  • Hi Nik,

    A good practice will have a small (e.g 33Ω) series resistor between the MCU and the SPI of LMX device. The purpose of this resistor is to limit the current flow in case the source is logic HIGH while the slave is short to ground for some reasons.

  • Hi Noel,

    I've removed the voltage divider resistors on EVM (R43, R45, R47) to GND and replaced R42, R44, R48 with 33 Ohms. It helped slightly with the slew rate but I'm still unable to read back values when other slaves are connected on SPI.  (SCLK slew rate is close 15V/us, still below 30V/us).

    However, it seems that even when these slaves are connected on SPI, SPI writes are going through. I'm checking this by toggling R0 Power Down mode 0 and 1 and can see current change between 35mA and 2mA (on VCC 3.3V rail on SMA connected). The reads work perfectly fine as soon as I remove the CLK from host to rest of my slave system.

    Do we have any TI switches we can use to isolate SPI bus of LMX2571 to SPI bus of other components in system to avoid this issue? Unless you have any suggestions on how to perform reads correctly with other slaves hanging off?  Read-back would be really nice to have

    Best,

    Nik

  • See next post

  • Hi Nik,

    Is MUXout connected to other devices as well? If other devices' SDO are not Hi-Z but logic LOW, the readback data will be shut to ground. Please note MUXout is also not Hi-Z.

    you can go here: https://www.ti.com/switches-multiplexers/analog/products.html for analog switch and MUX.

  • Hi Noel, 

    Yes the MUXout is connected but removing it from rest of SDO bus and manually probing the EVM MUXOut , I still see 0x00 (instead of 0x4000).  Only removing SCLK from rest of system causes it to read correctly. 

    Best,

    Nik

  • Hi Nik,

    I don't have any cue then, the SPI interface should be very straight forward.