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?? 

  • 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

  • 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??