Post Go back to editing

AD5293 IS NOT setting wiper position

Category: Hardware
Product Number: AD5293

Hi,

Hi,

I am using two AD5293BRUZ-100 digital potentiometers connected to the same SPI bus with separate SYNC (chip select) signals.

Hardware

  • AD5293BRUZ-100 (100 kΩ version)

  • MCU SPI configured as Mode 1 (CPOL = 0, CPHA = 1)

  • VDD = 24 V

  • VLOGIC = 3.3 V

  • RDY = 3.3 V

  • RESET = 3.3 V

  • Separate SYNC lines for each AD5293

  • Shared SCLK, SDI, and SDO

  • SDO, SDI, and SCLK pulled up to 3.3 V through 10 kΩ resistors

Initial Issue

The SDO line was always low whenever an AD5293 was connected. After reviewing the datasheet and EngineerZone posts, I found that sending:

0x8001

followed by:

0x0000

places the SDO pin into high-impedance mode. After doing this, the pull-up works correctly and I can observe activity on the SDO line.

Based on EngineerZone discussions, this appears to be expected behavior because SDO does not automatically enter high-impedance mode when SYNC is deasserted.

Current Issue

I am now trying to verify that the RDAC register is actually being updated.

Initialization Sequence

  1. 0x8001

  2. 0x0000

  3. 0x1802 (enable RDAC writes)

Write Operation

For example, writing code 512:

  • Command = Write RDAC

  • Data = 512

Readback Operation

  1. Send Read RDAC command

  2. Wait for RDY

  3. Send NOP command

However, the value returned on SDO appears to be the previous command rather than the programmed RDAC value.

For example, after sending a Read RDAC command, the next NOP transaction returns the previous command frame instead of the expected RDAC value. Sending additional NOP commands does not appear to return the programmed wiper value either.

Questions

  1. Is the readback sequence above correct for the AD5293?

  2. What is the exact recommended SPI sequence for:

    • Enabling writes

    • Writing a wiper value

    • Reading back the wiper value

  3. Is the returned data expected to be delayed by one or more SPI frames?

  4. Does placing SDO into high-impedance mode using 0x8001 followed by 0x0000 affect readback behavior in any way?

  5. Is there any additional step required after enabling SDO high-impedance mode before readback can be performed?

Verifying RDAC Update Physically

I am also looking for a reliable way to verify that the RDAC value is actually changing.

The AD5293 is being used in rheostat mode:

  • Terminal A is left open

  • W and B are used

  • Device is the 100 kΩ version

Questions:

  1. After writing codes such as 0, 512, and 1023, what is the recommended way to verify that the RDAC has actually updated?

  2. Can I power down the board and measure resistance directly between W and B to verify the programmed value?

  3. If so, should I expect approximately:

    • Code 0 → near 0 Ω

    • Code 512 → approximately 50 kΩ

    • Code 1023 → approximately 100 kΩ

  4. Are there any considerations when measuring W-B resistance in-circuit that could cause misleading readings?

Any guidance, example SPI transaction captures, or recommendations for verifying correct RDAC operation would be greatly appreciated.

Thank you.

Thank you.

  • Power Up

    ├── MOSI: 0x8001   (Prepare SDO High-Z)
    │   MISO: xxxx     (Don't care)

    ├── MOSI: 0x0000   (NOP)
    │   MISO: 8001 i am getting

    │   --> SDO becomes High-Z
    │   --> Pull-up drives SDO to 3.3V

    ├── MOSI: 0x1802   (Enable RDAC Write)
    │   MISO: xxxx

    ├── MOSI: 0x0600   (Write RDAC = 512)
    │   MISO: 0x1802   <-- Previous command seen

    ├── MOSI: 0x0800   (Read RDAC)
    │   MISO: 0x0600   <-- Previous command seen

    ├── MOSI: 0x0000   (NOP)
    │   MISO: 0x0800   <-- Read command seen back but here i should see 512 back but not what mistakje may be i done here

  • /*
     * File Name                    : main.c
     * Version No                   : 0.1
     * Version Date                 :
     * Description                  : Main application entry file for
     *                                Battery Cell Simulator project.
     *                                This file initializes device clock,
     *                                GPIO, interrupts, board peripherals,
     *                                UART and digital potentiometer driver.
     *                                It continuously handles UART based
     *                                user interaction for DAC and
     *                                potentiometer operations.
     * External Functions           : Device_init,
     *                                Device_initGPIO,
     *                                Interrupt_initModule,
     *                                Interrupt_initVectorTable,
     *                                Board_init,
     *                                InitUART,
     *                                DigitalpotInit,
     *                                read_voltage_fromuser.
     * Internal Functions           : None
     * NOTE                         : Main loop continuously waits for
     *                                UART user commands to control
     *                                DAC outputs and potentiometer
     *                                operations.
     * Standard Header              : None
     * User Defined Header          : DAC_HAL.h,
     *                                POT_HAL.h.
     * LLR                          :
     * HLR                          :
     * Defect Tracking              : None
     * Revision History             : None
     *
     * Version No                   Date                Author
     * 0.1                                              Harisha
     *
     * Copyright (c) 2025-26.
     * All rights reserved.
     */
    #include <POT_HAL.h>
    #include "DAC_HAL.h"

    uint16_t value = 0;

    /*========= Main Function ==============*/
    void main(void)
    {
        /*==== Initialize device clock and peripherals ====*/
        Device_init();

        /*==== Initialize GPIO ====*/
        Device_initGPIO();

        /*==== Initialize interrupt module ====*/
        Interrupt_initModule();

        /*==== Initialize interrupt vector table ====*/
        Interrupt_initVectorTable();

        /*==== Board initialization ====*/
        Board_init();

        /*==== UART Initialization ====*/
        InitUART();

        /*==== Digipot coarse adj Initialization ====*/
        AD5293_Init();

        /*==== Enable Global Interrupts ====*/
        EINT;
        ERTM;

        /*==== Main Loop ====*/
        while(1)
        {
    //      //read_voltage_fromuser();
            AD5293_SetWiperPot1(50);

            DEVICE_DELAY_US(500000);

            value = AD5293_ReadWiperPot1();

        }
    }
    void AD5293_Init(void)
    {
        /*Enabling write operation of Potentiometer1*/
    //    AD5293_Reset(POT1);
    //    DEVICE_DELAY_US(10000);

        AD5293_EnableSDO(POT1);
        DEVICE_DELAY_US(10000);

    //    AD5293_EnableSDO(POT2);
    //    DEVICE_DELAY_US(10000);

    //    AD5293_Shutdown(POT1,0);
    //
    //    DEVICE_DELAY_US(10000);
    //
    //    AD5293_EnableWrite(POT1);
    //
    //    DEVICE_DELAY_US(10000);

        /*Enabling write operation of Potentiometer2*/
        AD5293_EnableWrite(POT1);
        DEVICE_DELAY_US(10000);
    }


    /*
     * Function Name                : AD5293_SetWiperPot1
     * Function Description         : Writes wiper position to POT1 RDAC
     *                                register through SPI interface.
     * Return Type                  : void
     * Return Type Description      : None
     * Parameter(s)                 : uint16_t POT_Value
     * Parameter(s) Description     : 10-bit RDAC wiper position value.
     * Global Variable(s) Accessed  : dacTxData,dacRxData
     * Global Variable(s) Modified  : dacTxData
     * Library Function(s) Called   : GPIO_writePin,
     *                                SPI_pollingFIFOTransaction,
     *                                GPIO_readPin.
     * Called By                    : Update_Potentiomter
     * Calls                        : None
     * LLR                          :
     * HLR                          :
     * NOTE                         : POT1 is selected using POT1_SYNC pin.
     */
    void AD5293_SetWiperPot1(uint16_t POT_Value)
    {
        uint16_t Value = 0 ;

        uint16_t dacTxData[2];
        uint16_t dacRxData[2];

        /* Generate WRITE RDAC command frame */
        Value = (AD5293_CMD_WRITE_RDAC << 10) | (POT_Value & 0X3FF);

        /* Load SPI transmit buffer */
        dacTxData[0] = Value;

        /* Select POT1 */
        GPIO_writePin(POT1_SYNC, 0);

        /* Send SPI frame */
        SPI_pollingFIFOTransaction(SPIA_BASE,16,dacTxData,dacRxData,1,0);
        DEVICE_DELAY_US(10);

        /* De-select POT1 */
        GPIO_writePin(POT1_SYNC, 1);

        /* Wait until RDAC operation completes */
        /* Wait for busy */
        while(GPIO_readPin(POT1RDY) == 1);

        /* Wait for operation complete */
        while(GPIO_readPin(POT1RDY) == 0);

    }

    /*
     * Function Name                : AD5293_SetWiperPot2
     * Function Description         : Writes wiper position to POT2 RDAC
     *                                register through SPI interface.
     * Return Type                  : void
     * Return Type Description      : None
     * Parameter(s)                 : uint16_t POT_Value
     * Parameter(s) Description     : 10-bit RDAC wiper position value.
     * Global Variable(s) Accessed  : dacTxData,dacRxData
     * Global Variable(s) Modified  : dacTxData
     * Library Function(s) Called   : GPIO_writePin,
     *                                SPI_pollingFIFOTransaction,
     *                                GPIO_readPin.
     * Called By                    : Update_Potentiomter
     * Calls                        : None
     * LLR                          :
     * HLR                          :
     * NOTE                         : POT1 is selected using POT2_SYNC pin.
     */
    void AD5293_SetWiperPot2(uint16_t POT_Value)
    {
        uint16_t Value = 0 ;
        uint16_t dacTxData[2];
        uint16_t dacRxData[2];

        /* Generate WRITE RDAC command frame */
        Value = (AD5293_CMD_WRITE_RDAC << 10) | (POT_Value & 0X3FF);

        /* Load SPI transmit buffer */
        dacTxData[0] = Value;

        /* Select POT2 */
        GPIO_writePin(POT2_SYNC, 0);

        /*==== Send SPI frame ====*/
        SPI_pollingFIFOTransaction(SPIA_BASE,16,dacTxData,dacRxData,1,0);

        /* De-select POT1 */
        GPIO_writePin(POT2_SYNC, 1);

        /* Wait until RDAC operation completes */
        while(GPIO_readPin(POT2RDY) == 1);
    }



    /*
     * Function Name                : AD5293_ReadWiperPot1
     * Function Description         : Reads current RDAC wiper position
     *                                from POT1 using SPI readback sequence.
     * Return Type                  : uint16_t
     * Return Type Description      : Returns 10-bit RDAC wiper value.
     * Parameter(s)                 : None
     * Parameter(s) Description     : None
     * Global Variable(s) Accessed  : dacRxData
     * Global Variable(s) Modified  : dacTxData
     * Library Function(s) Called   : GPIO_writePin,
     *                                SPI_pollingFIFOTransaction,
     *                                GPIO_readPin.
     * Called By                    : Update_Potentiomter
     * Calls                        : None
     * LLR                          :
     * HLR                          :
     * NOTE                         : Readback requires READ command followed
     *                                by NOP command sequence.
     */
    uint16_t AD5293_ReadWiperPot1(void)
    {
        uint16_t result = 0;
        uint16_t Value = 0;
        uint16_t dacTxData[2];
        uint16_t dacRxData[2];

        /* Generate Read RDAC command frame */
        Value = (AD5293_CMD_READ_RDAC << 10);

        /* Load SPI transmit buffer */
        dacTxData[0] = Value;

        /* Select POT1 */
        GPIO_writePin(POT1_SYNC, 0);

        /*==== Send SPI frame ====*/
        SPI_pollingFIFOTransaction(SPIA_BASE,
                                   16,
                                   dacTxData,
                                   dacRxData,
                                   1,
                                   0);
        DEVICE_DELAY_US(3);

        /* De-select POT1 */
        GPIO_writePin(POT1_SYNC, 1);

        /* Wait until RDAC operation completes */
        /* Wait for busy */
        while(GPIO_readPin(POT1RDY) == 1);

        /* Wait for operation complete */
        while(GPIO_readPin(POT1RDY) == 0);


        /*================================================*/
        /*==== Send NOP Command To Receive Readback ======*/
        /*================================================*/

        /* Load SPI transmit buffer */
        dacTxData[0] = AD5293_CMD_NOP;

        /* Select POT1 */
        GPIO_writePin(POT1_SYNC, 0);

        /*==== Send SPI frame ====*/
        SPI_pollingFIFOTransaction(SPIA_BASE,
                                   16,
                                   dacTxData,
                                   dacRxData,
                                   1,
                                   0);

        /* De-select POT1 */
        GPIO_writePin(POT1_SYNC, 1);

        /* Wait until RDAC operation completes */
        /* Wait for busy */
        while(GPIO_readPin(POT1RDY) == 1);

        /* Wait for operation complete */
        while(GPIO_readPin(POT1RDY) == 0);

        /*==== Extract 10-bit RDAC Value ====*/
        result = (dacRxData[0] & 0x03FF);

        return result;
    }


    /*
     * Function Name                : AD5293_ReadWiperPot2
     * Function Description         : Reads current RDAC wiper position
     *                                from POT2 using SPI readback sequence.
     * Return Type                  : uint16_t
     * Return Type Description      : Returns 10-bit RDAC wiper value.
     * Parameter(s)                 : None
     * Parameter(s) Description     : None
     * Global Variable(s) Accessed  : dacRxData
     * Global Variable(s) Modified  : dacTxData
     * Library Function(s) Called   : GPIO_writePin,
     *                                SPI_pollingFIFOTransaction,
     *                                GPIO_readPin.
     * Called By                    : Update_Potentiomter
     * Calls                        : None
     * LLR                          :
     * HLR                          :
     * NOTE                         : Readback requires READ command followed
     *                                by NOP command sequence.
     */
    uint16_t AD5293_ReadWiperPot2(void)
    {
        uint16_t result = 0;
        uint16_t Value = 0;
        uint16_t dacTxData[2];
        uint16_t dacRxData[2];

        /* Generate Read RDAC command frame */
        Value = (AD5293_CMD_READ_RDAC << 10);

        /* Load SPI transmit buffer */
        dacTxData[0] = Value;

        /* Select POT2 */
        GPIO_writePin(POT2_SYNC, 0);

        /*==== Send SPI frame ====*/
        SPI_pollingFIFOTransaction(SPIA_BASE,
                                   16,
                                   dacTxData,
                                   dacRxData,
                                   1,
                                   0);

        /* De-select POT2 */
        GPIO_writePin(POT2_SYNC, 1);
        DEVICE_DELAY_US(1);

        /* Wait until RDAC operation completes */
        while(GPIO_readPin(POT2RDY) == 1);

        /*================================================*/
        /*==== Send NOP Command To Receive Readback ======*/
        /*================================================*/

        /* Load SPI transmit buffer */
        dacTxData[0] = AD5293_CMD_NOP;

        /* De - Select POT2 */
        GPIO_writePin(POT2_SYNC, 0);

        /*==== Send SPI frame ====*/
        SPI_pollingFIFOTransaction(SPIA_BASE,
                                   16,
                                   dacTxData,
                                   dacRxData,
                                   1,
                                   0);

        /* De-select POT2 */
        GPIO_writePin(POT2_SYNC, 1);

        /* Wait until RDAC operation completes */
        while(GPIO_readPin(POT2RDY) == 1);

        /*==== Extract 10-bit RDAC Value ====*/
        result = (dacRxData[0] & 0x03FF);

        return result;
    }


    /*
     * Function Name                : AD5293_Reset
     * Function Description         : Resets the selected AD5293 digital
     *                                potentiometer RDAC register to
     *                                midscale position through SPI command.
     * Return Type                  : void
     * Return Type Description      : None
     * Parameter(s)                 : uint8_t WhichPot
     * Parameter(s) Description     : Selects POT1 or POT2 for reset operation.
     * Global Variable(s) Accessed  : dacTxData,dacRxData
     * Global Variable(s) Modified  : dacTxData
     * Library Function(s) Called   : GPIO_writePin,
     *                                SPI_pollingFIFOTransaction,
     *                                GPIO_readPin.
     * Called By                    : Application layer.
     * Calls                        : None
     * LLR                          :
     * HLR                          :
     * NOTE                         : Reset command moves RDAC wiper to
     *                                default midscale position.
     */
    void AD5293_Reset(uint8_t WhichPot)
    {
        uint16_t Value = 0;
        uint16_t dacTxData[2];
        uint16_t dacRxData[2];

        /* Generate Potentiometer Reset command frame */
        Value = (AD5293_CMD_RESET << 10);

        /* Load SPI transmit buffer */
        dacTxData[0] = Value;

        if(WhichPot == POT1)
        {
            /* Select POT1 */
            GPIO_writePin(POT1_SYNC, 0);
        }
        else
        {
            /* Select POT2 */
            GPIO_writePin(POT2_SYNC, 0);
        }

        /*==== Send SPI frame ====*/
        SPI_pollingFIFOTransaction(SPIA_BASE,
                                   16,
                                   dacTxData,
                                   dacRxData,
                                   1,
                                   0);

        if(WhichPot == POT1)
        {
            /* De - Select POT1 */
            GPIO_writePin(POT1_SYNC, 1);
            /* Wait until RDAC operation completes */
            while(GPIO_readPin(POT1RDY) == 1);
        }
        else
        {
            /* De - Select POT2 */
            GPIO_writePin(POT2_SYNC, 1);
            /* Wait until RDAC operation completes */
            while(GPIO_readPin(POT2RDY) == 1);
        }

    }

    /*
     * Function Name                : AD5293_Shutdown
     * Function Description         : Enables or disables shutdown mode for
     *                                selected AD5293 digital potentiometer.
     * Return Type                  : void
     * Return Type Description      : None
     * Parameter(s)                 : uint8_t WhichPot
     *                                uint8_t State
     * Parameter(s) Description     : WhichPot selects POT1 or POT2.
     *                                State = 0 Normal mode.
     *                                State = 1 Shutdown mode.
     * Global Variable(s) Accessed  : dacTxData,dacRxData
     * Global Variable(s) Modified  : dacTxData
     * Library Function(s) Called   : GPIO_writePin,
     *                                SPI_pollingFIFOTransaction,
     *                                GPIO_readPin.
     * Called By                    : Application layer.
     * Calls                        : None
     * LLR                          :
     * HLR                          :
     * NOTE                         : In shutdown mode Terminal A becomes
     *                                open circuit and W terminal connects
     *                                to Terminal B internally.
     */
    void AD5293_Shutdown(uint8_t WhichPot,uint8_t State)
    {
        uint16_t Value = 0;
        uint16_t dacTxData[2];
        uint16_t dacRxData[2];

        /* Generate Potentiometer Reset command frame */
        Value = (AD5293_CMD_SOFTWAREPWRDOWN << 10)
                | (State & 0x01);

        /* Load SPI transmit buffer */
        dacTxData[0] = Value;

        if(WhichPot == POT1)
        {
            /* Select POT1 */
            GPIO_writePin(POT1_SYNC, 0);
        }
        else
        {
            /* Select POT2 */
            GPIO_writePin(POT2_SYNC, 0);
        }

        /*==== Send SPI frame ====*/
        SPI_pollingFIFOTransaction(SPIA_BASE,
                                   16,
                                   dacTxData,
                                   dacRxData,
                                   1,
                                   0);

        if(WhichPot == POT1)
        {
            /* De - Select POT1 */
            GPIO_writePin(POT1_SYNC, 1);

            /* Wait until RDAC operation completes */
            while(GPIO_readPin(POT1RDY) == 1);
        }
        else
        {
            /* De - Select POT2 */
            GPIO_writePin(POT2_SYNC, 1);

            /* Wait until RDAC operation completes */
            while(GPIO_readPin(POT2RDY) == 1);
        }

    }



    /*
     * Function Name                : AD5293_EnableWrite
     * Function Description         : Enables RDAC register write operation
     *                                by updating the control register of
     *                                selected AD5293 digital potentiometer.
     * Return Type                  : void
     * Return Type Description      : None
     * Parameter(s)                 : uint8_t WhichPot
     * Parameter(s) Description     : Selects POT1 or POT2 for write enable.
     * Global Variable(s) Accessed  : dacTxData,dacRxData
     * Global Variable(s) Modified  : dacTxData
     * Library Function(s) Called   : GPIO_writePin,
     *                                SPI_pollingFIFOTransaction,
     *                                GPIO_readPin.
     * Called By                    : DigitalpotInit
     * Calls                        : None
     * LLR                          :
     * HLR                          :
     * NOTE                         : RDAC write operation is disabled after
     *                                power-up by default and must be enabled
     *                                before updating wiper position.
     */
    void AD5293_EnableSDO(uint8_t WhichPot)
    {
        uint16_t Value = 0;
        uint16_t dacTxData[2];
        uint16_t dacRxData[2];

        /* Generate Potentiometer Reset command frame */
        Value = (uint16_t)(0x8001);

        /* Load SPI transmit buffer */
        dacTxData[0] = Value;

        if(WhichPot == POT1)
        {
            /* Select POT1 */
            GPIO_writePin(POT1_SYNC, 0);
        }
        else
        {
            /* Select POT2 */
            GPIO_writePin(POT2_SYNC, 0);
        }

        /*==== Send SPI frame ====*/
        SPI_pollingFIFOTransaction(SPIA_BASE,
                                   16,
                                   dacTxData,
                                   dacRxData,
                                   1,
                                   0);

        if(WhichPot == POT1)
        {
            /* De - Select POT1 */
            GPIO_writePin(POT1_SYNC, 1);

            /* Wait until RDAC operation completes */
            /* Wait for busy */
            while(GPIO_readPin(POT1RDY) == 1);

            /* Wait for operation complete */
            while(GPIO_readPin(POT1RDY) == 0);
        }
        else
        {
            /* De - Select POT2 */
            GPIO_writePin(POT2_SYNC, 1);

            /* Wait until RDAC operation completes */
            while(GPIO_readPin(POT2RDY) == 1);
        }


        Value = (uint16_t)(0x0000);

        /* Load SPI transmit buffer */
        dacTxData[0] = Value;

        if(WhichPot == POT1)
        {
            /* Select POT1 */
            GPIO_writePin(POT1_SYNC, 0);
        }
        else
        {
            /* Select POT2 */
            GPIO_writePin(POT2_SYNC, 0);
        }

        /*==== Send SPI frame ====*/
        SPI_pollingFIFOTransaction(SPIA_BASE,
                                   16,
                                   dacTxData,
                                   dacRxData,
                                   1,
                                   0);

        if(WhichPot == POT1)
        {
            /* De - Select POT1 */
            GPIO_writePin(POT1_SYNC, 1);

            /* Wait until RDAC operation completes */
            /* Wait for busy */
            while(GPIO_readPin(POT1RDY) == 1);

            /* Wait for operation complete */
            while(GPIO_readPin(POT1RDY) == 0);
        }
        else
        {
            /* De - Select POT2 */
            GPIO_writePin(POT2_SYNC, 1);

            /* Wait until RDAC operation completes */
            while(GPIO_readPin(POT2RDY) == 1);
        }

    }


    void AD5293_EnableWrite(uint8_t WhichPot)
    {
        uint16_t Value = 0;
        uint16_t dacTxData[2];
        uint16_t dacRxData[2];

        /* Generate Potentiometer Reset command frame */
        Value = (uint16_t) (AD5293_CMD_WRITE_CONTROL << 10) | (0x0002);

        /* Load SPI transmit buffer */
        dacTxData[0] = Value;

        if(WhichPot == POT1)
        {
            /* Select POT1 */
            GPIO_writePin(POT1_SYNC, 0);
        }
        else
        {
            /* Select POT2 */
            GPIO_writePin(POT2_SYNC, 0);
        }

        /*==== Send SPI frame ====*/
        SPI_pollingFIFOTransaction(SPIA_BASE,
                                   16,
                                   dacTxData,
                                   dacRxData,
                                   1,
                                   0);
        DEVICE_DELAY_US(10);

        if(WhichPot == POT1)
        {
            /* De - Select POT1 */
            GPIO_writePin(POT1_SYNC, 1);

            /* Wait until RDAC operation completes */
            /* Wait for busy */
            while(GPIO_readPin(POT1RDY) == 1);

            /* Wait for operation complete */
            while(GPIO_readPin(POT1RDY) == 0);
        }
        else
        {
            /* De - Select POT2 */
            GPIO_writePin(POT2_SYNC, 1);

            /* Wait until RDAC operation completes */
            while(GPIO_readPin(POT2RDY) == 1);
        }

    }
    /*==== AD5293 Command Definitions ====*/

    /* Command0 = No Operation */
    #define AD5293_CMD_NOP              (0x0000UL)
    /* Command1 = Write RDAC */
    #define AD5293_CMD_WRITE_RDAC       (0x1UL)
    /* Command2 = Read RDAC */
    #define AD5293_CMD_READ_RDAC        (0x2UL)
    /* Command3 = Software Reset */
    #define AD5293_CMD_RESET            (0x4UL)
    /* Command4 = Write Control Register */
    #define AD5293_CMD_WRITE_CONTROL    (0x6UL)
    /* Command5 = Read Control Register */
    #define AD5293_CMD_READ_CONTROL     (0x7UL)
    /* Command6 = Software Power Down */
    #define AD5293_CMD_SOFTWAREPWRDOWN  (0x8UL) .void SPIA_controller_init(){
        SPI_disableModule(SPIA_controller_BASE);
        SPI_setConfig(SPIA_controller_BASE, DEVICE_LSPCLK_FREQ, SPI_PROT_POL0PHA1,
                      SPI_MODE_CONTROLLER, SPIA_controller_BITRATE, SPIA_controller_DATAWIDTH);
        SPI_setPTESignalPolarity(SPIA_controller_BASE, SPI_PTE_ACTIVE_LOW);
        SPI_enableFIFO(SPIA_controller_BASE);
        SPI_disableLoopback(SPIA_controller_BASE);
        SPI_setEmulationMode(SPIA_controller_BASE, SPI_EMULATION_FREE_RUN);
        SPI_enableModule(SPIA_controller_BASE);
    } this is my code tell em is there any thing i am doing wrong here 

  • Hi  

    Thank you for using AD5293. Your query is acknowledged and we will get back to you.
    In the meantime, can you provide a schematic/connection for the AD5293?

    Regards,
    Flynn