AnsweredAssumed Answered

M4 pin mux problem

Question asked by Xu Ji on Aug 29, 2019
Latest reply on Sep 3, 2019 by igorpadykov

Hello,

 

we make project on i.MX8QXP platform,and camera and display add GPIO to control their power enable.

M4 need add the pin control,I add the pin config in pin_mux.c and pin_mux.h,but after the pin add M4 can not boot.

please give help,is there some guide to config GPIO in M4 size?

my code like below,I want to use this as GPIO function:

in head file

/* Camera960 (number A29), 1V8_EN */

#define BOARD_INITPINS_960_PWR18_EN_GPIO LSIO__GPIO4 /*!< GPIO device name: LSIO__GPIO4 */
#define BOARD_INITPINS_960_PWR18_EN_GPIO_PIN 30U /*!< LSIO__GPIO4 pin index: 30 */
#define BOARD_INITPINS_960_PWR18_EN_PIN_NAME ENET0_RGMII_TX_CTL /*!< Pin name */
#define BOARD_INITPINS_960_PWR18_EN_PIN_FUNCTION_ID SC_P_ENET0_RGMII_TX_CTL /*!< Pin function id */
#define BOARD_INITPINS_960_PWR18_EN_LABEL "960_PWR18_EN" /*!< Label */
#define BOARD_INITPINS_960_PWR18_EN_NAME "960_PWR18_EN" /*!< Identifier name */

/* EX_PWR_EN (number J31), CAM_DIS_1V1_EN */
#define BOARD_INITPINS_EX_PWR_EN_PERIPHERAL LSIO__GPIO0 /*!< GPIO device name: LSIO__GPIO0 */
#define BOARD_INITPINS_EX_PWR_EN_SIGNAL 16U /*!< LSIO__GPIO0 pin index: 16 */
#define BOARD_INITPINS_EX_PWR_EN_PIN_NAME SPI3_CS0 /*!< Pin name */
#define BOARD_INITPINS_EX_PWR_EN_PIN_FUNCTION_ID SC_P_SPI3_CS0 /*!< Pin function id */
#define BOARD_INITPINS_EX_PWR_EN_LABEL "EX_PWR_EN" /*!< Label */
#define BOARD_INITPINS_EX_PWR_EN_NAME "EX_PWR_EN" /*!< Identifier name */

in BOARD_InitPins()

 

 err = sc_pad_set_all(ipc, BOARD_INITPINS_960_PWR18_EN_PIN_FUNCTION_ID, 0U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_ENET0_RGMII_TX_CTL register modification value */
 if (SC_ERR_NONE != err)
 {
 assert(false);
 }

 err = sc_pad_set_all(ipc, BOARD_INITPINS_EX_PWR_EN_PIN_FUNCTION_ID, 0U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_SPI3_CS0 register modification value */
 if (SC_ERR_NONE != err)
 {
 assert(false);
 }

 

Thanks

Outcomes