I'm trying to do SPI read from AD9954. My design is using 4 wires SPI, which mean utilizing SDIO and SDO port of AD9954. I have set bit 9 of CFR1 at addr 0x00 to '1', bit 8 leave it at '0' for MSB first. Then I tried to read CFR2 at addr 0x01. I would expect to receive readback for the unused bit [23:16] as its default value which is 0x18. But I get all '0'.
I'm able to get 0x18 if I use 3 wires SPI, using SDIO only. Of course bit 9 of the addr 0x00 is set to '0' for SDIO operation.
I'm using Zynq as a master, PS side of the zynq only support 4 wires SPI, to use 3 wires SPI I have to add bi-directional buffer at the PL side to concert SDIO into MOSI and MISO. Therefore as far as PS is concern, there is no difference if I use 3 or 4 wires SPI because write signal is still out of its MOSI port and read signal goes into MISO port. This is prove that my bare metal C code is written correctly.
What I'm seeing now is SDO port of AD9954 doesnt respond to the read request from the master. But if it is configured as SDIO mode, AD9954 did respond to the read request.
Unfortunately I can't use 3 wires SPI as the controller is shared with other slave that requires a "special" handling to the MOSI signal.
Please help me to resolve the read problem asap. Thank you very much
Kheng Oon Lim
(1) Since it 3-wire operation (default) appears to be functional, have you tried writing a value to an arbitrary register and reading back the same value to verify the device is actually being programmed?
(2) Do you assert IO_UPDATE after writing a register?
(2) Assuming the answer to (1) & (2) is "yes"... When using 4-wire operation, have you probed the SDO pin with an oscilloscope? That is, do you have physical confirmation of no activity on the SDO pin or are you solely relying on software verification? The device should have no problem operating in a 4-wire configuration.
The answer to your (1) and (2) is actually "NO" . Perhaps my mistake was not assert "IO_UPATE" after register write. I will do that to see if it works. Anyway, I will reconfirm (1) and (2).
Ok, now it works. My mistake was I didn't assert IO_UPDATE after each write. I think it mentions in the datasheet that serial operation occur at register level not byte level. I read it but couldn't understand what it was.
Thanks for your help.