Post Go back to editing

Regarding Configuring AD5737 using SPI communication

Hello,

I have a problem in initializing AD5737 using SPI communication.

Problem : I tried writing to registers of AD5737 using SPI communication from TMS320F2808 microcontroller. I am able to generate SPI clock pulse on falling edge (according to datasheet) and data is available on SDI line of AD5737 (attached image of oscilloscope of SPI output, conforming data is locked into SDI line on falling edge). I am following the output enabling procedure provided on datasheet of AD5737 pg.no 25( Rev.F), where 24 bit data(i.e corresponding register values according to procedure) is sent on 24 clock pulses with the delay of 100us between each data transmission(i.e SYNC is held high for 100us between each 24bit data transmission). But i am not getting any kind of response from AD5737.As i am completely new to this, please let me know how do i confirm that data is sent from microcontroller is been received by AD5737.

Note:

1. After following the output enabling procedure, I tried to check Vboost output but it always remains at input voltage( but Vboost value should be according to configuration done on DC-DC control register values sent through SPI) .

2..I even tried to send only software reset values from microcontroller to SDI of AD5737 (i.e 1C9555 in this case) and checked whether the reset pin held low or not(output at reset pin is  unchanged).

3. I tried to readback from AD5737 but no output avaliable on SDO of AD5737.

Please let me know if my approach for configuring AD5737 is proper or not, and provide the solution to verify AD5737 is responding to SPI commands.

I have attached the following for reference: 

1. Schematic of AD5737

2.SPI data on oscilloscope.

SPI output on OSCILLOSCOPEschematic of AD5737 connection wrt microcontroller

Thank you,

Parents
  • Hi ,

    Can you provide the complete schematic? I see some TPs in the schematic but not sure where they are connected to.

    Figure 51 of the data sheet provides the configuration steps for the part, can you enumerate the sets of commands/transactions you sent to the part (in hex) for each of the step?

    On step 3, once you enable the DC_DC bit, you should be able to see PWM on SWx pins and an increase VBOOST_x voltage. 

    Can you confirm?

    Cheers,

    Ivan

  • TP's in schematic is just for test points and are not connected.
    only SDI, CLK, SYNC,LDAC pins are provided from microcontroller through isolator.
    LDAC is given to GPIO pin which is in pull down status.

  • Hi ,

    Can you confirm that each SPI frame you sent consists of 24 bits?

    My understanding on your code is that you only send 16 bits per frame.

    Cheers,

    Ivan

  •  Hi sir,

    I verified that data sent on MOSI pin is 24bit which is observed the same on oscilloscope.
    I have attached the image of oscilloscope which i took while sending the data from microcontroller to AD5737, I probed the output of ADUM1410 i.e. pin 14,13,12 according to schematic (which i sent in previous message).

    I can verify data is sent on MOSI pin on falling edge of clock pulses. I have set the clock frequency of 500Kbps, also tried increasing the clock frequency to 1Mbps but still no response from DAC. 
    According to code i m sending data using SPI FIFO and i have set the character length of 8.
    So as per my code

    SpibRegs.SPITXBUF = 0x1C00; // SOFTWARE RESET
    SpibRegs.SPITXBUF = 0x8500;
    SpibRegs.SPITXBUF = 0x5500;

    DELAY_US(200);

    the above data will be available as 1C8555 on MOSI pin for 24 Clock pulses(as per timing diagram of AD5737 write function)

    Kindly guide me if any changes in register values (according to code) is required.


    Hardware terms:
    Verified power supplies provided to AD5737 is within the range as per datasheet
    if any changes to be done in schematic, please let me know.

    Thanks again :)

Reply
  •  Hi sir,

    I verified that data sent on MOSI pin is 24bit which is observed the same on oscilloscope.
    I have attached the image of oscilloscope which i took while sending the data from microcontroller to AD5737, I probed the output of ADUM1410 i.e. pin 14,13,12 according to schematic (which i sent in previous message).

    I can verify data is sent on MOSI pin on falling edge of clock pulses. I have set the clock frequency of 500Kbps, also tried increasing the clock frequency to 1Mbps but still no response from DAC. 
    According to code i m sending data using SPI FIFO and i have set the character length of 8.
    So as per my code

    SpibRegs.SPITXBUF = 0x1C00; // SOFTWARE RESET
    SpibRegs.SPITXBUF = 0x8500;
    SpibRegs.SPITXBUF = 0x5500;

    DELAY_US(200);

    the above data will be available as 1C8555 on MOSI pin for 24 Clock pulses(as per timing diagram of AD5737 write function)

    Kindly guide me if any changes in register values (according to code) is required.


    Hardware terms:
    Verified power supplies provided to AD5737 is within the range as per datasheet
    if any changes to be done in schematic, please let me know.

    Thanks again :)

Children
  • Hi,

    Noticed that the ADx pins are connected to some test pins. Please assert the ADx pin properly by fixing them to either DVDD or GND. Asserting them to GND should comply with your codes.

    Checked your register values and they seem fine.

    Another way to confirm if your SPI lines or comm protocol is ok is to:
    Write 1C8555 (reset)
    Write 1C9000 (User program, toggles D11 of the status register)
    Read 980000 (readback on the status register)
    Write 1CE000 (NOP, no operation to clock out the status register contents on the SDO/MISO pin)
    having D11 = 1 on the readback from the status register means that SPI line/comm protocol is OK. 

    About:

    GpioDataRegs.GPACLEAR.bit.GPIO15 = 1;

    is this connected to the Clear pin (TP12) in your schematic?

    By the way, you mentioned that there is an isolator between MCU and AD5737 board. have you checked that too? Are you seeing the same signals on the output of your MCU and the pins of AD5737?

    Best regards,

    Ian

  • Hello sir,
    Thanks for your answer.

    According to schematic MCU is connected to AD5737 through ADuM1411 (as mentioned in datasheet (Rev F) page no 42 fig 65). I've verified the SPI commands are available at the output point of ADuM1411 i.e. input pins (SPI lines) of  AD5737.  

    Regarding CLEAR pin of AD5737 is not connected to MCU and left floating.
    Please clarify that shall i connect CLEAR pin of AD5737 to MCU.


    Kindly, Confirm me regarding the connections of AD5737 is proper. Please let me know, if any changes to be made .

    I will make the changes mentioned by you and i'll try to do user toggling as per your guidelines.
    I'll let you know the outcome. But please confirm me regarding the connections of AD5737 wrt MCU.

    For your reference :
    Power supplies for AD5737 is verified.
     
    Only SPI pins from MCU is connected to AD5737 i.e.
    MOSI of MCU is connected  SDI
    CLK of MCU is connected to CLK of AD5737
    CS of MCU is connected to SYNC of AD5737
    GPIO of MCU is connected to LDAC of AD5737(which is in pull down status)

    Test point(TP) pins are floating and not connected to MCU.
    I have confusions regarding the connections of below mentioned pins which are provided with TP:
    CLEAR pin of AD5737 is floating.
    RESET pin of AD5737 is floating.
    FAULT pin of AD5737 is floating.
    ALEART pin of AD5737 is floating.


    Thanks & Regards,
    Swathi B K

  • Hi,

    Please clarify that shall i connect CLEAR pin of AD5737 to MCU.

    For now, no need to connect this pin. but I suggest it be pulled low. For safety, the unused digital inputs should be properly asserted. Clear pull low, RESET is pulled high (or you can control it via a GPIO, up to you)

    Kindly, Confirm me regarding the connections of AD5737 is proper. Please let me know, if any changes to be made .

    Your current connections seem fine. You need to probe the SDO and extract the data on the next clock cycle after the read command (NOP command transaction).

    Let me know what happens.

    Best regards,

    Ian

  • Hello sir,
    Thanks for answer again.
    Sorry to bug you again, Can you please verify delay between multiple write commands and between read and write commands?

    In current code, I am maintaining 100us between multiple write commands and 40us between write and read command (according to datasheet timing diagram, it is provided in 198nano seconds(minimum value) between write and read command [fig.4 readback timing diagram). I think because of problem in delay period, there is some issue in communicating with AD5737.

    Thanks & regards
    Swathi B K

  • Hi Swathi,

    There shouldn't be a problem with your current delay setup. The t6 spec given in the datasheet is the minimum value. 

    On step 3, once you enable the DC_DC bit, you should be able to see PWM on SWx pins and an increase VBOOST_x voltage. 

    Can you confirm?

    Ivan also mentioned this part above. were you able to confirm it? at least get some response on the SWx pins to know if we are able to write to the DCDC control register. 

    Best regards.

    Ian

  • Hi Swathi,

    another question. What Rload did you connect on you IOUTA pin? I see that there is an R137 series R, what value is this? 

    You may also want to try midscale output first. 6FFF (12mA) on a 500ohm or 1kohm load. 

    Best regards,

    Ian

  • Hello sir,

    We have connected 1K ohm resistor at IOUT pin.
    R137 is 10ohm resistor  which is provided for protection.

    Thanks & Regards
    Swathi B K

  • Okay sir, I'll try these steps and let you know the outcome.

    Thanks & Regards
    Swathi B K

  • Hello sir,

    I am able to communicate with AD5737 after ADx pins are grounded.
    Now i am able to get PWM output also.
    Thank you very much for your help Slight smile

    Thanks & Regards
    Swathi B K