AnsweredAssumed Answered

AD5504 SPI

Question asked by Dvorkin on May 20, 2016
Latest reply on May 21, 2016 by Dvorkin

AD5504 datasheet (rev. B) says about SPI write mode :

Data on the SDI line is clocked into the 16-bit shift register on the rising edge of SCLK.

Figures 3 and 4 of the datasheet say the same.

But I can't write nothing using rising edge of ACLK. I can write only using falling edge of SCLK.

Why?

 

And also I can not write to AD5504 using Linux SPI driver. I can write only when I toggle SPI lines by soft.

When I use Linux SPI driver all timings are met. All waveforms are fine too. But it does not work neither in SPI_MODE_0 nor in SPI_MODE_1. SPI speed is 8 MHz and 1 MHz too.

Are there some "secrets" in Linux SPI driver using?

 

I use Zynq and Xilinx Linux 4.0. The device tree is (see SPI0_LE_DAC device):

axi-quad-spi@41e00000 {
compatible = "xlnx,xps-spi-2.00.a";
reg = <0x41e00000 0xffff>;
interrupt-parent = <0x3>;
interrupts = <0x0 0x20 0x4>;
bus-num = <0x1>;
xlnx,num-ss-bits = <0x4>;
xlnx,has-ss0 = <0x1>;
xlnx,has-ss1 = <0x1>;
xlnx,has-ss2 = <0x1>;
xlnx,has-ss3 = <0x1>;
#address-cells = <0x1>;
#size-cells = <0x0>;

 

 

SPI0_LE_DAC@0 {
compatible = "spidev";
reg = <0x0>;
spi-max-frequency = <0x17d7840>;
};

 

 

SPI0_LE_ATT0@1 {
compatible = "spidev";
reg = <0x1>;
spi-max-frequency = <0x17d7840>;
};

 

 

SPI0_LE_ATT1@2 {
compatible = "spidev";
reg = <0x2>;
spi-max-frequency = <0x17d7840>;
};

 

 

SPI0_LE_REG@3 {
compatible = "spidev";
reg = <0x3>;
spi-max-frequency = <0x17d7840>;
};
};

Outcomes