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

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

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