Post Go back to editing

EVAL-AD4110 ERROR WITH DEMO FIRMWARE

Category: Software
Product Number: EVAL-AD4110

Hi, I'm using EVAL-AD4110-1SDZ evaluation board and the SDP-K1 board to run the EVAL-AD4110 firmware.

The AD4110 chip is always in error with the corresponding red led on.

I've modified the code in order to debug. Leaving only the software reset SPI communication (a sequence of 8 0xFF from the interface controller to the AD4110-1 chip) the result is the same.

The low level SPI communication seams to be correct using a logic state analyzed.

Theorically the firmware was developed expressly for this two boards so it should have been a plug and play test.

Thanks

Carlo L.

Parents Reply Children
  • Hi.

    I'm doing an analysis with a logic analyzer connected to the J2 (MISO, MOSI, SCK, CS) of the EVAL-4110-1 board. From an electrical point of view, the communication seams to be ok but the software read all zeros (0x00) from the SPI API. I hope to be able to send some waveforms within the day. Bye

  • Hi  ,

    The Red LED would glow in case there are no inputs physically connected to the analog inputs (This occurs in case of an overvoltage or an undervoltage condition).

    So the reason why the SPI communication is failing here is, the EVAL-AD4110-1SDZ board requires the GPO0 and GPO1 to be set high via the firmware. GPO0 is required for the MISO signal and the GPO1 is required for enabling the SYNC functionality. 

    I am attaching an updated file with the initializations. Could you please try to replace the contents of the app_config.c on your end with this update?

    Also, please ensure that the SDP_120 connector is enabled via the firmware by uncommenting the "#define SDP_120" in the app_config_mbed.h in the firmware.

    /***************************************************************************//**
     *   @file    app_config.c
     *   @brief   Application configurations module
    ********************************************************************************
     * Copyright (c) 2022 Analog Devices, Inc.
     * All rights reserved.
     *
     * This software is proprietary to Analog Devices, Inc. and its licensors.
     * By using this software you agree to the terms of the associated
     * Analog Devices Software License Agreement.
    *******************************************************************************/
    
    /******************************************************************************/
    /***************************** Include Files **********************************/
    /******************************************************************************/
    
    #include "app_config.h"
    #include "no_os_uart.h"
    #include "ad4110_data_capture.h"
    
    /******************************************************************************/
    /************************ Macros/Constants ************************************/
    /******************************************************************************/
    
    /******************************************************************************/
    /*************************** Types Declarations *******************************/
    /******************************************************************************/
    
    /* UART init parameters */
    struct no_os_uart_init_param uart_init_params = {
    	.device_id = NULL,
    	.baud_rate = IIO_UART_BAUD_RATE,
    	.size = NO_OS_UART_CS_8,
    	.parity = NO_OS_UART_PAR_NO,
    	.stop = NO_OS_UART_STOP_1_BIT,
    	.extra = &uart_extra_init_params
    };
    
    /* GPIO - Chip select Pin init parameters */
    static struct no_os_gpio_init_param csb_init_param = {
    	.number = SPI_CSB,
    	.platform_ops = &csb_platform_ops
    };
    
    #if (DATA_CAPTURE_MODE == CONTINUOUS_DATA_CAPTURE)
    /* External interrupt init parameters */
    static struct no_os_irq_init_param ext_int_init_params = {
    	.irq_ctrl_id = 0,
    	.extra = &ext_int_extra_init_params,
    	.platform_ops = &irq_platform_ops,
    };
    /* External interrupt callback descriptor */
    static struct no_os_callback_desc ext_int_callback_desc = {
    	data_capture_callback,
    	NULL,
    	NULL
    };
    #endif
    
    /* UART descriptor */
    struct no_os_uart_desc *uart_desc;
    
    /* GPIO descriptor for the chip select pin */
    no_os_gpio_desc *csb_gpio;
    
    /* External interrupt descriptor */
    struct no_os_irq_ctrl_desc *external_int_desc;
    
    /* GPIO - Chip select Pin init parameters */
    static struct no_os_gpio_init_param gpo0_init_param = {
    	.number = SDP_GPIO_0,
    	.platform_ops = &csb_platform_ops
    };
    struct no_os_gpio_desc *gpo0_gpio;
    
    
    static struct no_os_gpio_init_param gpo1_init_param = {
    	.number = SDP_GPIO_1,
    	.platform_ops = &csb_platform_ops
    };
    struct no_os_gpio_desc *gpo1_gpio;
    
    /******************************************************************************/
    /************************ Functions Prototypes ********************************/
    /******************************************************************************/
    
    /******************************************************************************/
    /************************ Functions Definitions *******************************/
    /******************************************************************************/
    
    /**
     * @brief Initialize the UART peripheral
     * @return 0 in case of success, negative error code otherwise
     */
    static int32_t init_uart(void)
    {
    	return no_os_uart_init(&uart_desc, &uart_init_params);
    }
    
    
    #if (DATA_CAPTURE_MODE == CONTINUOUS_DATA_CAPTURE)
    /**
     * @brief Initialize the IRQ contoller
     * @return 0 in case of success, negative error code otherwise
     * @details This function initialize the interrupts for system peripherals
     */
    int32_t init_interrupt(void)
    {
    	int32_t ret;
    
    	do {
    		/* Init interrupt controller for external interrupt */
    		ret = no_os_irq_ctrl_init(&external_int_desc, &ext_int_init_params);
    		if (ret) {
    			break;
    		}
    
    		/* Register a callback function for external interrupt */
    		ret = no_os_irq_register_callback(external_int_desc,
    						  IRQ_INT_ID,
    						  &ext_int_callback_desc);
    		if (ret) {
    			break;
    		}
    
    		return 0;
    	} while (0);
    
    	return ret;
    }
    #endif
    
    
    /**
     * @brief Initialize the system peripherals
     * @return 0 in case of success, Negative error code otherwise
     */
    int32_t init_system(void)
    {
    	int32_t ret;
    
    	ret = init_uart();
    	if (ret) {
    		return ret;
    	}
    
    #if defined(USE_SDRAM_CAPTURE_BUFFER)
    	ret = sdram_init();
    	if (ret) {
    		return ret;
    	}
    #endif
    
    #if (DATA_CAPTURE_MODE == CONTINUOUS_DATA_CAPTURE)
    	ret = init_interrupt();
    	if (ret) {
    		return ret;
    	}
    
    	ret = no_os_gpio_get(&csb_gpio, &csb_init_param);
    	if (ret) {
    		return ret;
    	}
    
    	ret = no_os_gpio_direction_output(csb_gpio, NO_OS_GPIO_HIGH);
    	if (ret) {
    		return ret;
    	}
    #endif
    	ret = no_os_gpio_get(&gpo0_gpio, &gpo0_init_param);
    	if (ret) {
    		return ret;
    	}
    
    	ret = no_os_gpio_direction_output(gpo0_gpio, NO_OS_GPIO_HIGH);
    	if (ret) {
    		return ret;
    	}
    	ret = no_os_gpio_get(&gpo1_gpio, &gpo1_init_param);
    	if (ret) {
    		return ret;
    	}
    
    	ret = no_os_gpio_direction_output(gpo1_gpio, NO_OS_GPIO_HIGH);
    	if (ret) {
    		return ret;
    	}
    
    	return 0;
    }

    Thanks,

    Janani Sunil.

  • Thanks for the reply but from the schematic I don't understand the GPIO0 role in the SPI communication.

    The EVAL-AD4110-1SDZ has a galvanic isolator on data lines (ADUM1401). I've connected the logic analyzer at the ADC side and on the DOUT pin to the MCU at the MCU side (connecting the two ground refs).

    As you can see, the MOSI line at the ADC side is correct. It returns 0x0080 at the first AFE CTRL2 register read operation but the corresponding bit DOUT at the MCU side of the isolator is noisy (The orange track MISO_MCU D4).

    Below a capture by an agilent analog oscilloscope of the CS and DOUT at the MCU side:

    The yellow track is the CS pin while the green is the DOUT (MISO) both at the MCU side.

    I think thet the ADUM1401 is broken.
    Anyway I will try your solution.

    Bye

  • ***, you're right.

    I hadn't noticed that the GPIO0 pin is used to enable the VE1 pin of the ADUM1401. 


    Thanks a lot.

    Carlo L.