Post Go back to editing

Integrating ad9545 on custom board

Thread Summary

The user is integrating AD9545 on a custom card, initially using I2C which stopped working, and then successfully using SPI. For baremetal integration, the user needs the complete sequence of register addresses and values. The final answer suggests using the Save Registers button in the ACE GUI to get all configuration registers and following the Initialization Sequence from the AD9545 rev C data sheet, page 164. The user also has no_os codes and the AD9545 SPI and I2C files from GitHub, but these are not officially supported.
AI Generated Content
Category: Software
Product Number: AD9545

I tried to integrate AD9545 on a custom card with the I2C protocol initially, as the target is responded from the BSP example - slave_monitor_example. Then, it stopped responding due to hardware changes. After this, we started using SPI protocol to program the chip from Peta-Linux and it is successful. Here, including the output clocks in the code itself programs the board and output clocks are generated, sequence of register addresses to write the value happens in device tree.

But, when it comes to baremetal side to integrate AD9545, sequence of registers and the values to write to those addresses are needed without any missing register. From ACE GUI, we got the addresses and values which are changed after configuring AD9545 Evaluation board, so that we can use the sequence of registers to write the values in Vitis. ACE GUI only gives the changed values, but we need APLL,DPLL,VCO registers sequence also with it. Where can i find the complete sequence?? without missing any register address. 

I only found 4 files from the Github repository - ad9545.c, ad9545.h, ad9545_i2c.c, ad9545_spi.c. I have the no_os codes also with me. How to configure the AD9545 with the present resources?? We got the complete files of AD9528 files from Github, such that we were able to integrate AD9528, but those files are not present for AD9545. How to proceed now?? 

Parents
  • Hi,

    in the ACE GUI, there is on the bottom left a button called Save Registers. After creating your desired configuration (hopefully you already tested it on an eval board), click on this button and a file will be created with all the AD9545 configuration registers.

    Use the Initialization Sequence presented in the rev C AD9545 data sheet, page 164 to configure the AD9545 and get it going. I do not believe the AD9545 github files are supported, so I cannot help you on that front.

    Petre

  • Are you suggesting that there are no driver codes (.c, .h files similar to ad9528 codes) to initialize AD9545 in GitHub? We had all ready-made files to configure the AD9528(https://github.com/analogdevicesinc/no-OS/tree/main/drivers/frequency/ad9528), likewise i am expecting a complete set of files. How can i proceed to make that IC up on board to give output clocks??

    o
  • HI,

    I do not know anything about the AD9545 files on github. My assumption is the people that made them are not anymore with the company. I do not support them.

    If you have questions about how to configure the AD9545, I can help you through using the ACE based eval software. Then you can get the register values from it and using the Initialization procedure from the data sheet, you can use a controller to initialize the AD9545. 

    Petre

  • Tried to program the sequence from Vitis software. Can I use the spi_write() and spi_read() functions to write the register values to specific addresses in sequence? Is this enough or anything to add??

  • Hi,

    I'm sorry. You can certainly write these questions, but I doubt there will be anyone offering advice on the AD9545 code you downloaded from github.

    Petre

  • Thank you for your reply!

    We have written spi read and write function and we are able to read the vendor ID of AD9545 chip and we are able to write to registers (and we verified if those registers are updated by reading them later on)!

    We also have the ad9545 evaluation kit and using ACE GUI, we are able to generate required output clocks. So we know the register values corresponding to our ideal configuration.

    Now, we need to generate clocks by programming the ad9545 chip via FPGA. 

    We want to dump the register values using the driver codes but we aren't sure about what's the sequence of registers to write. 

    There are nearly 1030 registers in the text file that is created  after clicking save register values. Should we write all the values ? Please can you suggest how to do the register dump.

    And we noticed that when we write anything (such as 0x24, 0x34) 

    to the register at 0x00 address which is the spi config register, as per the ad9545 register map doc , the data is not written correctly because when we read the registers again after write operation, we see that it is always 0xFF. It works after commenting out that line. We aren't able to understand this strange behaviour. Please can you give us some pointers on what registers to write and what not to write to?

    It will be very much appreciated.

    Thank you

  • Hi,

    I told you already to follow the Initialization sequence section the rev C data sheet, page 164. You should write only the control registers, not the status registers. The status registers have addresses greater than 0x3000, so all these you do not need to write. Then there are EEPROM control registers, that have addresses greater than 0x2E00 that also do not need to be written. 

    I usually download the registers in the ascending order I get them from the cso file. I counted 993 registers. There are no particular rules on this.

    "And we noticed that when we write anything to the 0x00 address which is spi config (0x24, 0x34) as per the ad9545 register map doc , the data is not written correctly because when we read the registers again after write operation, we see that it is always 0xFF. It works after commenting out that line. We aren't able to understand this strange behavior."

    I suppose you use the SPI port to access the AD9545.

    The value 0x24 means that you set Address Ascension bit to 1. This feature is used if you want to write registers in a consecutive fashion. See the section in the data sheet at page 168 about it. Important are bits 3 and 4, SDO active, which by clearing to 0 it means you use 3 wire SPI mode. Value 0x34 may not be a good one because if bit 4 is 1, you need bit 3 to also be 1. And this bit sets the SPI in 4-wire mode.

    Usually this happens because the AD9545 works by default in 3 -wire mode and the controller works in 4-wire mode. But you say all the other registers may be read/written OK. I do not know. Put the oscilloscope probe on the SPI signals and see what is going on when you write register 0x00.  If you have a function that only accesses a register at a time, setting or clearing the Ascension bit does not affect it.

    Petre

  • Finally AD9545 was responded using SPI protocol and able to read the Product ID of the device 0x0121. But, issue is with initialization sequence now. Followed the sequence from page 164, System Clock Calibration sequence from page.165. Here, i'm facing an issue while reading back the data from 0x3001. I should get back the value as 0x3, but i am getting back 0x4. Thinking this is the reason, clock is not generating in board.With only the sequence of non-default register values we can't get the output clock in Custom card.
    And also how to verify that each block is locked, is it Register 0x3001 for this block to check System clock locked status or some other register??
    Can u help me with the sequence of this VCO,System Clock,APLL clocks and Manual clocks sequence???

  • HI,

    you need to get the system clock PLL locked and stable before you can move to other tasks. The fact that register 0x3001 shows a value 0x4 means bit 2, SYSCLK calibration busy is set to 1. So the system clock PLL does not want to lock. 

    It is not clear to me on what board you are getting this. On the eval board, which you said in one of your previous emails, functions well when managed by ACE, or on a board you designed?

    On the eval board:

    - verify the cso file configures correctly the system clock PLL according tot he jumpers on the board. Usually one uses the 52 MHz crystal resonator, so the jumpers P402 and P403 should be between the middle pin and the pins labelled XTAL. Then you need to check the box Xtal Source in the Configuration Wizard. See also the Stability Timer set at 50ms.

    - put an oscilloscope active probe on the crystal pins and see if they are oscillating at 52MHz. If they are not, maybe the AD9545 was destroyed.

    On your board: 

    - the AD9545 has some scratchpad registers  0x20 to 0x23. See if you can write and then read back the values, just to make sure the SPI communication works. Then do the steps I recommended for the eval board as well.

    Petre

Reply
  • HI,

    you need to get the system clock PLL locked and stable before you can move to other tasks. The fact that register 0x3001 shows a value 0x4 means bit 2, SYSCLK calibration busy is set to 1. So the system clock PLL does not want to lock. 

    It is not clear to me on what board you are getting this. On the eval board, which you said in one of your previous emails, functions well when managed by ACE, or on a board you designed?

    On the eval board:

    - verify the cso file configures correctly the system clock PLL according tot he jumpers on the board. Usually one uses the 52 MHz crystal resonator, so the jumpers P402 and P403 should be between the middle pin and the pins labelled XTAL. Then you need to check the box Xtal Source in the Configuration Wizard. See also the Stability Timer set at 50ms.

    - put an oscilloscope active probe on the crystal pins and see if they are oscillating at 52MHz. If they are not, maybe the AD9545 was destroyed.

    On your board: 

    - the AD9545 has some scratchpad registers  0x20 to 0x23. See if you can write and then read back the values, just to make sure the SPI communication works. Then do the steps I recommended for the eval board as well.

    Petre

Children
  • Hi Petre,
    The complete process which i mentioned was done on custom board, not on Evaluation board. We were able to read back the values which were written into any of the Scratchpad registers from 0x20 to 0x23. This confirms the SPI communication works. We are not trying to write to EEPROM now anyway, but if pins M3 and M4 are high, AD9545 expects register values from EEPROM in a case, but not mentioned in the Initialization steps. Do I need to make M3 and M4 pins low so that it won't depend on EEPROM to read the values or can i ignore it??
    And also how to make the PLL lock??

  • Hi,

    Both M3 and M4 pins have internal pull down resistors, so if you leave them floating, the AD9545 sees them at GND. This means the AD9545 does not download the configuration from the EEPROM and it expects to be accessed through SPI.

    Do you manipulate these pins high?

    "And also how to make the PLL lock??"

    If you refer to the system clock PLL, I addressed this in my previous response. Did you do what I suggested?

    Petre

  • Hi,

    Now on custom board, System clock is locked as I can read back the value of 0x3 from 0x3001. But then in the next stage of APLL Recalibration, APLL Lock detecting polling loop, I should get 0x8 for Lock Registers, instead I am getting 0x28 i.e both Bit4 and Bit5 are also up. How can I make it lock??
    Is it possible to make APLL lock without giving any reference clock for any of the REF inputs on Evaluation board.I am in doubt with my ACE register sequence now. Can you provide a .cso file or any text file which gives 30.72MHz clock output from all the outputs without REF clocks, so that I can use this sequence on custom board ??

    Thank you.

  • Hi,

    You should get bit 4, APLL0 calibration busy, in register 0x3100 cleared to 0 after the APLL0 calibration ended.

    I do not have a reason why both bit 4 and bit 5(APLL0 calibration done) are both set to 1 in register 0x3100. I verified and on my eval board, bit 5 is set to 1 and bit 4 is cleared to 0 after APLL0 calibration.

    The APLL0 and APLL1 calibration does not depend on providing a reference clock to the AD9545. I verified this.

    Send me your cso file (add a txt extension to it to be allowed to upload it) and I'll take a look. I'll create a cso file for you when you'll tell me what driver you want to use on the 30.72 MHz outputs: HCSL or CML and what current driver: 7.5mA, 12.5mA or 15mA.

    Petre

  • Hi Petre,

    With the CML mode set at output current driver with 15mA , i can able to get the sequence of non-default registers which made the SYSCLK locked and also the APLL0 and APLL1 locked with 0x9 as read back value instead of 0x8, i.e Bit0 is also up. But, anyway I was able to get the Output clocks from the AD9545 outputs on custom board.

    Thank you Petre for guidance.

    Jayanth

  • Now, we are trying to integrate AD9545  using Microcontroller with I2C protocol on other board. Can we follow the same process to read back the data from the Scratchpad registers to verify the communication. Once the communication is established, I can write the register values in sequence like previous. We tried to establish communication by trying all 4 possible I2C addresses of AD9545 as per M5,M6 settings with M3 at 0(not to read from EEPROM) and M4 at 1(I2C protocol), still no response. 

    How to proceed to get the I2C address of AD9545 and establish a communication?

  • Hi,

    I'm listing the settings you need to do to access the AD9545 using I2C:\

    Make sure the Mx pins high and low levels meet this specification above. Note that some Mx pins relate to VDDIOA, others to VDDIOB. Because the eval board has always VDDIOA=VDDIOB, I also recommend to use them as such. 

    -keep M4 high to enable I2C

    -keep M3 low to disable the AD9545 downloading from the EEPROM

    -Set M6 and M5 according to the table below to decide the AD9545 I2C address.

     

    - take out any additional device that may be accessed through the same I2C communication bus. This will avoid in the beginning any contention on the I2C lines. Then, after you get the AD9545 going, you can add it.

    - Make sure you have 1K resistor pull ups on the SCL and SDA I2C lines. The pull ups should be to VDDIOA:

    - I tried once with I2C address 0x48 and the AD9545 worked fine.

    - First, you set the pointer to the AD9545 register address to read. Use a register that has a non zero default value, like 0x000C or 0x000D.

    - put the scope probes on SCL and SDA lines. See if the AD9545 sends ACK after the first byte. If it does, see it acknowledging all bytes. Then you can read that register:

    See if your microcontroller generates ACK after every byte AD9545 sends.

    See if your microcontroller generates START and STOP signals.

    This is the full process with the two operations above put together:

    If the AD9545 does not send ACK after the first byte the microcontroller sent, maybe the command byte was not put together according to the protocol.

    Petre