This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VE-Q1: GPIO output wire is abnormal

Part Number: TDA4VE-Q1
Other Parts Discussed in Thread: SYSCONFIG

Hello,

we are using the TI System Configuration tool to configure the gpio pins of the tad4 chip, and we have two questions to ask.

1. How to configure ordinary gpio pins, how to select pull-up and pull-down? What is its initial level? What does Rx stand for?

2. How to configure high level for gpio pin? For example, for the G20 pin in the wkup domain, I have selected pull-up input and pull-up output respectively. Why is the voltage of this pin 0.5V? When I choose the default value no pull, the output voltage is 0v.

The GPIO configuration is as follows:

devicetree.dtsi

wkup_gpio0_pins_default: wkup_gpio0_pins_default {
        pinctrl-single,pins = <
            J721S2_WKUP_IOPAD(0x0cc, PIN_INPUT, 7) /* (C27) WKUP_GPIO0_3 */
            J721S2_WKUP_IOPAD(0x0e0, PIN_INPUT, 7) /* (F24) WKUP_GPIO0_8 */
            J721S2_WKUP_IOPAD(0x0e4, PIN_INPUT, 7) /* (H26) WKUP_GPIO0_9 */
            J721S2_WKUP_IOPAD(0x0e8, PIN_INPUT, 7) /* (F27) WKUP_GPIO0_10 */
            J721S2_WKUP_IOPAD(0x0ec, PIN_INPUT, 7) /* (F25) WKUP_GPIO0_11 */
            J721S2_WKUP_IOPAD(0x0f8, PIN_INPUT, 7) /* (B24) WKUP_GPIO0_14 */
            J721S2_WKUP_IOPAD(0x0fc, PIN_INPUT, 7) /* (D25) WKUP_GPIO0_15 */
            J721S2_WKUP_IOPAD(0x030, PIN_INPUT, 7) /* (G17) MCU_OSPI0_CSn1.WKUP_GPIO0_28 */
            J721S2_WKUP_IOPAD(0x03c, PIN_INPUT, 7) /* (F17) MCU_OSPI0_CSn3.WKUP_GPIO0_30 */
            J721S2_WKUP_IOPAD(0x040, PIN_INPUT, 7) /* (A19) MCU_OSPI1_CLK.WKUP_GPIO0_31 */
            J721S2_WKUP_IOPAD(0x044, PIN_INPUT, 7) /* (B20) MCU_OSPI1_LBCLKO.WKUP_GPIO0_32 */
            J721S2_WKUP_IOPAD(0x048, PIN_INPUT, 7) /* (B19) MCU_OSPI1_DQS.WKUP_GPIO0_33 */
            J721S2_WKUP_IOPAD(0x04c, PIN_INPUT, 7) /* (D21) MCU_OSPI1_D0.WKUP_GPIO0_34 */
            J721S2_WKUP_IOPAD(0x050, PIN_OUTPUT_PULLUP, 7) /* (G20) MCU_OSPI1_D1.WKUP_GPIO0_35 */
            J721S2_WKUP_IOPAD(0x054, PIN_INPUT, 7) /* (C20) MCU_OSPI1_D2.WKUP_GPIO0_36 */
            J721S2_WKUP_IOPAD(0x058, PIN_INPUT, 7) /* (A20) MCU_OSPI1_D3.WKUP_GPIO0_37 */
            J721S2_WKUP_IOPAD(0x05c, PIN_INPUT, 7) /* (D20) MCU_OSPI1_CSn0.WKUP_GPIO0_38 */
            J721S2_WKUP_IOPAD(0x060, PIN_INPUT, 7) /* (C21) MCU_OSPI1_CSn1.WKUP_GPIO0_39 */
            J721S2_WKUP_IOPAD(0x190, PIN_INPUT, 7) /* (K26) WKUP_GPIO0_49 */
            J721S2_WKUP_IOPAD(0x120, PIN_INPUT, 7) /* (G27) WKUP_GPIO0_56 */
            J721S2_WKUP_IOPAD(0x17c, PIN_INPUT, 7) /* (J26) WKUP_GPIO0_57 */
            J721S2_WKUP_IOPAD(0x180, PIN_INPUT, 7) /* (G25) WKUP_GPIO0_66 */
            J721S2_WKUP_IOPAD(0x184, PIN_INPUT, 7) /* (J27) WKUP_GPIO0_67 */
        >;
    };

J721s2_pinmux_data.c

/* WKUP_GPIO0 -> WKUP_GPIO0_35 -> G20 */
    {
        PIN_MCU_OSPI1_D1, PIN_MODE(7) | \
        ((PIN_PULL_DIRECTION) & (~PIN_PULL_DISABLE & ~PIN_INPUT_ENABLE))
    },

  • Hi Liu,

    How to configure high level for gpio pin? For example, for the G20 pin in the wkup domain, I have selected pull-up input and pull-up output respectively. Why is the voltage of this pin 0.5V? When I choose the default value no pull, the output voltage is 0v

    Quoting example:

    J721S2_WKUP_IOPAD(0x048, PIN_INPUT, 7) /* (B19) MCU_OSPI1_DQS.WKUP_GPIO0_33 */

    PIN_INPUT is good enough to configure a pin to GPIO. The RX_ACTIVE bit should be set.
    There are 2 levels when we configure a GPIO.

    How to configure high level for gpio pin? For example, for the G20 pin in the wkup domain, I have selected pull-up input and pull-up output respectively. Why is the voltage of this pin 0.5V? When I choose the default value no pull, the output voltage is 0v

    You will need to do the configuration in the GPIO layer. You need to make the GPIO high for the physical state to go high. The below FAQ will be of help:
    https://e2e.ti.com/f/791/t/948888

    Regards,
    Keerthy

  • Dear Keerthy,

    Hello, we did it as described above. Then the G20 we have problems with now belongs to the WKUP domain, not the MAIN domain. Please see the devicetree.dtsi and J721s2_pinmux_data.c we generated. At present, when the G20 pin is configured as GPIO and set to PIN_OUTPUT_PULLUP, the corresponding pin is measured and found that the voltage is 0.5V, which is inconsistent with the expected 1.8V. If this G20 is not configured, it will output 1.8V instead.

    We configured B24 as PIN_OUTPUT_PULLUP and found that the output is 1V, which is in line with expectations. The voltage configured as PIN_INPUT before is 0V, and this B24 is normal.

    Please help us to analyze the reasons and solutions for G20 pin configured as GPIO that cannot output 1.8V.

    Please answer these two questions:
    1. May I ask whether the drive mode of your GPIO is OC or OD, and which GPIO is the drive mode, such as WKUP_GPIO0?
    2. Regarding the configuration of the G20 pin, the GPIO is PIN_OUTPUT_PULLUP but the output is 0.5v, please help to check if there is any problem with our configuration, if not, please help to analyze

    Regards,

    Liu

  • Hi Liu,

    Data Sheet: https://www.ti.com/lit/ds/symlink/tda4al-q1.pdf?ts=1684493310361&ref_url=https%253A%252F%252Fwww.ti.com%252Fsitesearch%252Fen-us%252Fdocs%252Funiversalsearch.tsp%253FlangPref%253Den-US%2526searchTerm%253Dj721s2%2526nr%253D4

    Can you read the register value from U-Boot:

    md 0x4301C050 1

    This should have mode set to 7 & the bit18 RX_ACTIVE bit set. Something like 0x40007

    - Keerthy

  • Most of the IO on the device are LVCMOS (push/pull).  A couple of the I2C interface implement Open Drain IO.  The IO type is defined in the pin table of the data manual.  The IO should be able to drive to full voltage level based on IO bank power (VDDSHVx), which is either 1.8V or 3.3V.  If voltage is not able to drive to high level, then possible customer design has other issue (like possible multiple drivers on same net).

  • Dear Keerthy,

    We follow the use case change default GPIO port from MAIN GPIO0 to WAKEUP GPIO0 in packages\ti\drv\gpio\test\led_blink\src\main_led_blink.c, and add code on R5F2. Use WAKEUP GPIO0_35 to configure the pull-up output to 1.8V.

    currently existing problems:
    According to the GPIO_v0_hwAttrsList of packages\ti\drv\gpio\soc\j721s2\GPIO_soc.c, there is currently no WAKEUP GPIO0 configuration, and the main_led_blink.c use case also replaces MAIN GPIO0 to WAKEUP GPIO0, so that MAIN GPIO0 cannot be used. In fact, we need to use GPIO of MAIN and WAKEUP, how to configure please give an answer.

    According to the use case we added code

    diff --git a/r5f2_0/source/app_r5f2_0/coreInit.cpp b/r5f2_0/source/app_r5f2_0/coreInit.cpp
    index 9e5dd31..7069457 100644
    --- a/r5f2_0/source/app_r5f2_0/coreInit.cpp
    +++ b/r5f2_0/source/app_r5f2_0/coreInit.cpp
    @@ -114,6 +114,9 @@ GPIO_PinConfig gpioPinConfigs[] =
         GPIO_CFG_OUTPUT,
         /* TDA4_CAM_DMC_HSD_EN */
         GPIO_DEVICE_CONFIG(GPIO_TDA4_CAM_DMC_HSD_EN_PORTNUM, GPIO_TDA4_CAM_DMC_HSD_EN_PINNUM) |
    +    GPIO_CFG_OUTPUT,
    +    /* G20 output pin */
    +    GPIO_DEVICE_CONFIG(GPIO_G20_PORT_NUM, GPIO_G20_PIN_NUM) |
         GPIO_CFG_OUTPUT
     };
     GPIO_CallbackFxn gpioCallbackFunctions[] =
    @@ -123,6 +126,7 @@ GPIO_CallbackFxn gpioCallbackFunctions[] =
         NULL,
         NULL,
         NULL,
    +    NULL,
         NULL
     };
     /* GPIO Driver configuration structure */
    @@ -477,7 +481,20 @@ int32_t coreInit(
             /*
              *  GPIO init
              */
    +        GPIO_v0_HwAttrs gpio_cfg;
    +        static uint32_t portNum = GPIO_G20_PORT_NUM; // wakeup_gpio0
    +        static uint32_t pinNum = GPIO_G20_PIN_NUM;
    +        static uint32_t cfgId = 6; // gpioPinConfigs index
    +
    +        GPIO_socGetInitCfg(portNum, &gpio_cfg);
    +        /* change default GPIO port from MAIN GPIO0 to WAKEUP GPIO0 to access G20 */
    +        gpio_cfg.baseAddr = CSL_WKUP_GPIO0_BASE;
    +        // GPIO_configIntRouter(portNum, pinNum, 0, &gpio_cfg);
    +        GPIO_socSetInitCfg(portNum, &gpio_cfg);
    +
             GPIO_init();
    +
    +        GPIO_write(cfgId, 1); // set output to high
         } else {
     
             retVal = FVID2_EFAIL;
    diff --git a/r5f2_0/source/app_r5f2_0/coreInit.h b/r5f2_0/source/app_r5f2_0/coreInit.h
    index c2cce1a..fe66750 100644
    --- a/r5f2_0/source/app_r5f2_0/coreInit.h
    +++ b/r5f2_0/source/app_r5f2_0/coreInit.h
    @@ -117,6 +117,10 @@ extern Udma_DrvHandle  hUdmaDrv;
     #define GPIO_TDA4_CAM_DMC_HSD_EN_PORTNUM    (0U)
     #define GPIO_TDA4_CAM_DMC_HSD_EN_PINNUM     (50U)
     
    +/* GPIO G20 WAKEUP GPIO0_35*/
    +#define GPIO_G20_PIN_NUM       35
    +#define GPIO_G20_PORT_NUM      0

    Regards,

    Liu

  • Hello,

    No main domain GPIO pins directly connected to LEDs on EVM, so used WKUP domain GPIO pins which connected to LEDs on base board.
    This should have mode set to 7 & the bit18 RX_ACTIVE bit set. Something like 0x40007

    As mentioned for WKUP domain GPIO similar can be done for Main domain.Need to configure the corresponding PADCONFIG REGISTER.

    Regards

    Tarun Mukesh