AnsweredAssumed Answered

Using GPIOs on ADuCM3029 EZ kit

Question asked by akaran5 on Sep 5, 2017
Latest reply on Sep 15, 2017 by AOsama

Hello,

 

I am trying to work with the GPIOs on ADuCM3029 EZ Kit board. I have set up the board using J-Link lite emulator.

I am trying to set one of the GPIOs as an output pin and then set it high.

My code goes as follows -

ADI_GPIO_RESULT eResult;
    static uint8_t gpioMemory[ADI_GPIO_MEMORY_SIZE];
    common_Init();
    do
    {
        if(adi_pwr_Init()!= ADI_PWR_SUCCESS)
        {
            DEBUG_MESSAGE("\n Failed to initialize the power service \n");
            eResult = ADI_GPIO_FAILURE;
            break;
        }
        if(ADI_PWR_SUCCESS != adi_pwr_SetClockDivider(ADI_CLOCK_HCLK,1))
        {
            DEBUG_MESSAGE("Failed to initialize the power service\n");
            eResult = ADI_GPIO_FAILURE;
            break;
        }
        if(ADI_PWR_SUCCESS != adi_pwr_SetClockDivider(ADI_CLOCK_PCLK,1))
        {
            DEBUG_MESSAGE("Failed to initialize the power service\n");
            eResult = ADI_GPIO_FAILURE;
            break;
        }

 

        /* init the GPIO service */
        if(ADI_GPIO_SUCCESS != (eResult = adi_gpio_Init(gpioMemory, ADI_GPIO_MEMORY_SIZE)))
        {
            DEBUG_MESSAGE("adi_gpio_Init failed\n");
            break;
        }
        if(ADI_GPIO_SUCCESS != (eResult = adi_gpio_OutputEnable(GPIO_PORT2, GPIO_PIN_6, true)))
                {
                    DEBUG_MESSAGE("adi_gpio_outputenbale failed\n");
                    break;
                }
        if(ADI_GPIO_SUCCESS != (eResult = adi_gpio_SetHigh(GPIO_PORT2, GPIO_PIN_6)))
        {
            DEBUG_MESSAGE("adi_gpio_setHigh failed");
            break;
        }

    }
    while(1);

I am not getting in compilation errors or any of the error messages I have set in order to detect any failed function calls.

I am getting all the values for variable "eResult", as I should for a correctly functioning code.

 

However, I am not getting any signal at pin 6. So, I believe that the issue is more hardware than coding.

Is there any jumper configuration which needs to be done for enabling the GPIOs? Currently, I have connected the jumpers to enable J-Link emulator.

Outcomes