Tool/software:
Hi TI experts,
I use TDA4VE EVM (J721S2 SOM + CPB) which is running in Linux + RTOS mode with SDK version r85.
My purpose is to turn on USER_LED1, which is connected to GPIO Expeader2 Port2:PIN6 (P26) when display port 0 (DP0_PWR_SW_EN) is turned on.
I add below code in vision_apps/utils/dss/src/app_dss_soc.c
void appDssConfigureDP(void)
{
Board_STATUS b_status;
Board_IoExpCfg_t ioExpCfg;
appLogPrintf("DSS: Turning on DP_PWR pin for eDP adapters ... !!!\n");
#if defined (SOC_J721E)
ioExpCfg.i2cInst = 1U;
#elif defined (SOC_J721S2) || defined (SOC_J784S4)
ioExpCfg.i2cInst = 4U;
#endif
ioExpCfg.socDomain = BOARD_SOC_DOMAIN_MAIN;
ioExpCfg.slaveAddr = 0x20;
ioExpCfg.enableIntr = false;
ioExpCfg.ioExpType = ONE_PORT_IOEXP;
ioExpCfg.portNum = PORTNUM_0;
ioExpCfg.pinNum = PIN_NUM_0;
ioExpCfg.signalLevel = GPIO_SIGNAL_LEVEL_HIGH;
b_status = Board_control(BOARD_CTRL_CMD_SET_IO_EXP_PIN_OUT, (void *)(&ioExpCfg));
#if defined (SOC_J721S2) || defined (SOC_J784S4)
appLogWaitMsecs(500u);
#endif
+ #if defined (SOC_J721S2)
+ appLogPrintf("DSS: Turning on USER_LED1 ... !!!\n");
+ ioExpCfg.i2cInst = 0U; // BOARD_I2C_IOEXP_DEVICE2_INSTANCE
+ ioExpCfg.socDomain = BOARD_SOC_DOMAIN_MAIN;
+ ioExpCfg.slaveAddr = 0x22U; // BOARD_I2C_IOEXP_DEVICE2_ADDR
+ ioExpCfg.enableIntr = false;
+ ioExpCfg.ioExpType = THREE_PORT_IOEXP;
+ ioExpCfg.portNum = PORTNUM_2;
+ ioExpCfg.pinNum = PIN_NUM_6;
+ ioExpCfg.signalLevel = GPIO_SIGNAL_LEVEL_HIGH;
+ b_status = Board_control(BOARD_CTRL_CMD_SET_IO_EXP_PIN_OUT, (void *)(&ioExpCfg));
+ appLogWaitMsecs(500u);
+ #endif
if (b_status == BOARD_SOK)
{
appLogPrintf("DSS: Turning on DP_PWR pin for eDP adapters ... Done!!!\n");
}
...
But I found that the MCU2 firmware gets stuck in Board_control() when controlling GPIO Expander2..
I have noticed that some of the pins of GPIO Expander2, such as GPIO_uSD_PWR_EN, are controlled by A72 Linux.
I am wondering if it is possible to control GPIO Expander2 pins in the MCU2 RTOS firmware as well? and how?
Please advise, thank you.
Regards,
Christopher