Post Go back to editing

GPIO: Unable to activate output

Category: Hardware
Product Number: Sc835

Hello,

my setup consists of a SC835W-SOM board and the BRKOUT breakout board.
I successfully am able to activate GPIO pins PC_1, PC_2 & PC_3, which normally would be connected to the three LEDs on the SOMCRR EZKIT.
When trying to enable output on any other pin (e.g. PC_11), I am however not able to observe any voltage on the breakout board.
Am I missing a step?

My main function looks like this

int main(void)
{
	uint32_t gpioMaxCallbacks;
	static uint8_t gpioMemory[GPIO_MEMORY_SIZE];
    adi_gpio_Init((void*)gpioMemory, GPIO_MEMORY_SIZE, &gpioMaxCallbacks);

    adi_gpio_SetDirection(ADI_GPIO_PORT_C, ADI_GPIO_PIN_11, ADI_GPIO_DIRECTION_OUTPUT);
    adi_gpio_SetDirection(ADI_GPIO_PORT_C, ADI_GPIO_PIN_2, ADI_GPIO_DIRECTION_OUTPUT);


    adi_gpio_Set(ADI_GPIO_PORT_C, ADI_GPIO_PIN_11);
    adi_gpio_Set(ADI_GPIO_PORT_C, ADI_GPIO_PIN_2);


    while (1);
	return PASSED;
}
 

I measure 3.3V at header P4, pin 45 (which is connected to PC_2), but 0V at header P5, pin 6 (which is connected to PC_11).

I am glad for any help regarding this topic!

  • Hi,

    Regarding "When trying to enable output on any other pin (e.g. PC_11), I am however not able to observe any voltage on the breakout board "
    >>> Could you please confirm that output voltage only on PC_1, PC_2 & PC_3. Have you tried using any other pins on PORT A and PORT B?

    We hope you have connected SC835W-SOM, BRKOUT and SOMCRR EZKIT properly.

    Regards,
    Nandini C

  • Hi Nandini,

    thank you for your quick response! Please excuse the delay, I was not able to work with the hardware during the holiday season.

    I now extended my little program like this:

    int main(void)
    {
        // set PORT_FER register bits to zero to enable GPIO mode
    	*pREG_PORTA_FER = 0x00;
    	*pREG_PORTB_FER = 0x00;
    	*pREG_PORTC_FER = 0x00;
    	*pREG_PORTD_FER = 0x00;
    	*pREG_PORTE_FER = 0x00;
    
        // set PORT_DIR register bits to one to set direction to output
    	*pREG_PORTA_DIR = 0xFFFF;
    	*pREG_PORTB_DIR = 0xFFFF;
    	*pREG_PORTC_DIR = 0xFFFF;
    	*pREG_PORTD_DIR = 0xFFFF;
    	*pREG_PORTE_DIR = 0xFFFF;
    
        while (1)
        {
            // delay
            for (uint32_t counter = 0x400000; counter > 0; counter--) ;
    
            // set PORT_DATA to output high signal
            *pREG_PORTA_DATA = 0xFFFF;
            *pREG_PORTB_DATA = 0xFFFF;
            *pREG_PORTC_DATA = 0xFFFF;
            *pREG_PORTD_DATA = 0xFFFF;
            *pREG_PORTE_DATA = 0xFFFF;
    
            // delay
            for (uint32_t counter = 0x200000; counter > 0; counter--) ;
    
            // set PORT_DATA to output low signal
            *pREG_PORTA_DATA = 0x0000;
            *pREG_PORTB_DATA = 0x0000;
            *pREG_PORTC_DATA = 0x0000;
            *pREG_PORTD_DATA = 0x0000;
            *pREG_PORTE_DATA = 0x0000;
        }
    }


    It now tries to blink all available GPIO pins from ports A, B, C, D and E, in order to easily distinguish them from pins being held high by any other mechanism.

    I checked all pins on the BRKOUT, and was able to observe the switching voltage on a few of them.
    Still, I do not obserce any voltage on the following pins:

    • Port A: 00 - 09
    • Port B: 13
    • Port C: 04, 07, 11, 12, 13, 15
    • Port D: 00 - 15 (all)
    • Port E: 00 - 02

    Do you have any idea what might cause these issues? I also tried setting the PORT_LOCK registers, the PORT_MUX registers and the drive strength registers - unfortunately without any success so far... 

    Thanks for your help!

    BR, Marius

  • Hi,

    Thank you for sharing the details.

    For PortC_07, the default PC_07 pin function is SYS_FAULT.

    The Fault functionality needs to be disabled to use the pin PC_07. It can be disabled by setting "FAULT_DIS" bit in the Peripheral PAD configuration0 (PADS_PCFG0) register as below snippet.

    *pREG_PADS0_PCFG0 |= BITM_PADS_PCFG0_FAULT_DIS;

    For Port A (00 – 09), Port B_13, and Port C_4: In schematic page 10, the signals from the DSP to the XSPI are connected, while the signals from the DSP to the SOM interface are disconnected.

    Therefore, please set SOM_XSPI_EN to LOW and XSPI_EN to HIGH. This can be achieved by configuring the soft config switch on the SOM board.

    The attached code accomplishes this by calling the function ConfigSoftSwitches_EV_SC835().

     ConfigSoftSwitches_EV_SC835.zip

    Please note that "TWI 1"(which is muxed) is being used to configure the soft-switches. Application is expected to do the appropriate Pin-Muxing for "TWI 1" before doing the switch configuration.

    Please refer page no 10 in the below linked Schematic for details :

    https://www.analog.com/media/en/technical-documentation/eval-board-schematic/adspsc835w-ev-som-schem.pdf

    Could you please try aforementioned changes and let us know the results. We will get back to you for remaining signals.

    Regards,
    Nandini.C

  • Hi,

    thank you very much for your tips and explanations!
    Using your suggestions, I am now successfully able to observe a switching output voltage on PC_07 and the XSPI pins!

    From the schematic, it appears as if many of the remaining problematic pins are related to ETH0 - is there another register configuration required to enable GPIO mode on those? From a quick glance through the (extensive) EMAC section of the reference manual, I could unfortunately not find it.

    Thank you for your time and effort!

    BR, Marius

  • Hi, 

    I hope your are doing well!
    Could you find any more information on what might cause our issues with the remaining pins, especially Port D?

    Looking forward to your response!

    BR, Marius

  • Hi Marius,

    We are looking into this and will get back to you shortly.

    Regards,
    Nandini C

  • Hi Marius,

    We have validated the other pins including PORT D and they are getting toggled properly .

    Port C: 11, 12, 13, 15
    Port D: 00 - 15 (all)
    Port E: 00 - 02

    We have verified in SC835 SOM setup. There is no difference in SC835 and SC835W w.r.t these pins. So, probably there can be issue with breakout connections (might be loose) .

    Could you please verify the breakout board connections and try again?

    Regards,
    Nandini C

  • Hi Nandini,

    please excuse the long delay - we were rather busy with integrating A²B onto the new board, I only now found some free time with the hardware.
    I flashed my demo program to another one of our baords, but unfortunately did observe exactly the same behavior (no output on the said pins).

    Do you have any further Ideas what we could try? I cannot imagine an exactly identical loose connection on two different boards!

    Thanks for your time,

    Marius

  • Hi Marius,

    Could you please try to probe directly on the SOM stacking connectors instead of using breakout pins.

    Regards,
    Nandini C