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.

PROCESSOR-SDK-J721S2: j721s2 device

Part Number: PROCESSOR-SDK-J721S2
Other Parts Discussed in Thread: SYSCONFIG

Hi, 

I am trying to set the pin status to high,i configured in the device tree. For writing to this pin i am using the GPIO_Write   function. But what is the index value i need to feed to this function. how to differentiate the wakeup and main domain GPIO pins. 

  • Hi Maheshwar,

    Easiest tool to get started on which pins are indexed to which address would be the sysconfig tool: https://dev.ti.com/sysconfig/#/start. Select the device J721S2, and there should be options to add WKUP_GPIO and (MAIN) GPIO.

    Values can also be crosschecked with the datasheet: https://www.ti.com/lit/gpn/tda4vl-q1.

    Regards,

    Takuma

  • Hi Takuma,

    yes i seen that file generated from the sysconfig tool. But when i called the function Gpio_write(10,1) it's not going to high. How to consider the first parameter what is range of the first parameter and i trying to set the pin g-20. How to find the index for all the pin.

  • Hi Maheshwar,

    Understood. If you have not already, could you try looking through this FAQ: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1126741/faq-tda4vm-using-pdk-gpio-driver

    This talks about how GPIO init can be initialized and explains what parameters GPIO_write() expects based on how the PinConfig struct is defined.

    Regards,

    Takuma

  • Waiting for the reply. Provide the information to set the GPIO pin by using the Gpio_write function. How to find the index value for the Gpio_write function in which file i can find the index value. We are having the separate project for the R5F core. We initialized some pins in the same project for those pins i can able to set/reset but other pins are initialized in the linux .dts file, for those pins how to ser/rest from the R5F core. 

  • Hi Maheshwar,

    Apologies, I may have not understood the question correctly. My understanding was that you would like to know how to use the Gpio_write function, and specifically how to determine what "index value" parameter in GPIO_write means. The FAQ linked in my previous post should answer this question.

    The procedure outlined in the FAQ is as follows:

    1. Before calling GPIO Init, define gpioPinConfigs[] with PIN | DIR.

      "Where PIN should be a hexadecimal value 0xABCD

      Where AB represents Port number and CD represents the Pin number. For example, for configuring WKUP_GPIO0_16: PIN = 0x0010 and DIR = GPIO_CFG_OUTPUT or GPIO_CFG_INPUT"

    2. Then, based on the order gpioPinConfigs is defined, it determines PIN_INDEX to use in GPIO_write. For example, if only 1 pin is defined in gpioPinConfigs[], use GPIO_write(0, 1) to change the first pin defined in gpioPinConfigs[] to high.

    We initialized some pins in the same project for those pins i can able to set/reset but other pins are initialized in the linux .dts file, for those pins how to ser/rest from the R5F core. 

    Based on this comment, now I am under the impression that you are trying to control pins defined for the ARM A72 core running Linux, but instead of using Linux, you are trying to control these through RTOS running on the ARM R5F cores. If that is the question, then this is not possible. Each GPIO pin should be configured to be controlled either through Linux or RTOS but not both at the same time - this would cause resource conflicts.

    If the goal is to control a certain GPIO pin from Linux on the A72 core, then please initialize in the dts file, and if the goal is to control a certain GPIO pin from RTOS on the R5F core, the please do not define these in the dts file and use the procedure outlined in the FAQ linked in my previous post.

    Please let me know if this answered the question. If I am still misunderstanding the question, please clarify what the end goal is - for example, is the end goal to have code running on the R5F to toggle a GPIO pin, or instead is it the A72 core running Linux to toggle a GPIO pin? And if there is something that was not clear in my response, please let me know which portion needs clarification.

    Regards,

    Takuma