Imx8qxp M4 GPIO_PinInit failed

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Imx8qxp M4 GPIO_PinInit failed

跳至解决方案
3,503 次查看
relax-wu
Contributor IV

Hi

    SCFW has allocated the group of gpio IMX8QXP_QSPI0A to M4.
    Failed to initialize GPIO in M4
    Modify as follows:

 

diff --git a/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/isi_board.c b/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/isi_board.c
index 36fede3..7784fd6 100644
--- a/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/isi_board.c
+++ b/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/isi_board.c
@@ -76,6 +76,21 @@
 #define CAMERA_RST_PIN_IDX 0
 #define CAMERA_PD_PIN_IDX 1
 
+/*
+ * nvp6324 Camera en pin:
+ *
+ * QSPI0A :
+ * Camera1 En Pin: LSIO_GPIO3_IO13
+ * Camera2 En Pin: LSIO_GPIO3_IO9
+ * Camera3 En Pin: LSIO_GPIO3_IO10
+ * Camera4 En Pin: LSIO_GPIO3_IO11
+ */
+#define CAMERA_EN_GPIO LSIO__GPIO3
+#define CAMERA1_EN_PIN_IDX 13
+#define CAMERA2_EN_PIN_IDX 9
+#define CAMERA3_EN_PIN_IDX 10
+#define CAMERA4_EN_PIN_IDX 11
+
 #elif ISI_EXAMPLE_CI == ISI_CI_PI
 /*
  * Camera reset pin and power down pin:
@@ -1389,6 +1404,12 @@ void BOARD_PrepareCamera(void)
 	};
 
 	GPIO_PinInit(CAMERA_GPIO, CAMERA_RST_PIN_IDX, &gpioConfig);
+
+	/* camera enable */
+	GPIO_PinInit(CAMERA_EN_GPIO, CAMERA1_EN_PIN_IDX, &gpioConfig);
+	GPIO_PinInit(CAMERA_EN_GPIO, CAMERA2_EN_PIN_IDX, &gpioConfig);
+	GPIO_PinInit(CAMERA_EN_GPIO, CAMERA3_EN_PIN_IDX, &gpioConfig);
+	GPIO_PinInit(CAMERA_EN_GPIO, CAMERA4_EN_PIN_IDX, &gpioConfig);
 #endif
 
     /* Enable ISI interrupt. */
diff --git a/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/pin_mux.c b/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/pin_mux.c
index dbd2976..cf285ab 100644
--- a/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/pin_mux.c
+++ b/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/pin_mux.c
@@ -131,6 +131,31 @@ void BOARD_InitPins(sc_ipc_t ipc)                          /*!< Function assigne
   {
       assert(false);
   }
+
+  //camera enable gpio
+  err = sc_pad_set_all(ipc, BOARD_INITPINS_QSPI0A_DQS_PIN_FUNCTION_ID, 4U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_QSPI0A_DQS register modification value */
+  if (SC_ERR_NONE != err)
+  {
+      assert(false);
+  }
+
+  err = sc_pad_set_all(ipc, BOARD_INITPINS_QSPI0_DATA0_PIN_FUNCTION_ID, 4U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_QSPI0A_DATA0 register modification value */
+  if (SC_ERR_NONE != err)
+  {
+      assert(false);
+  }
+
+  err = sc_pad_set_all(ipc, BOARD_INITPINS_QSPI0_DATA1_PIN_FUNCTION_ID, 4U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_QSPI0A_DATA1 register modification value */
+  if (SC_ERR_NONE != err)
+  {
+      assert(false);
+  }
+
+  err = sc_pad_set_all(ipc, BOARD_INITPINS_QSPI0_DATA2_PIN_FUNCTION_ID, 4U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_QSPI0A_DATA2 register modification value */
+  if (SC_ERR_NONE != err)
+  {
+      assert(false);
+  }
 #elif (ISI_EXAMPLE_CI == ISI_CI_PI)
   err = sc_pad_set_all(ipc, BOARD_INITPINS_BB_CSI_D0_PIN_FUNCTION_ID, 0U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_CSI_D00 register modification value */
   if (SC_ERR_NONE != err)
diff --git a/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/pin_mux.h b/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/pin_mux.h
index b9dac2d..cab9c43 100644
--- a/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/pin_mux.h
+++ b/android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera/pin_mux.h
@@ -269,6 +269,42 @@
 #define BOARD_INITPINS_BB_CSI_RST_B_PIN_FUNCTION_ID               SC_P_CSI_RESET   /*!< Pin function id */
 #define BOARD_INITPINS_BB_CSI_RST_B_LABEL                "BB_CSI_RST_B/J13E[37]"   /*!< Label */
 #define BOARD_INITPINS_BB_CSI_RST_B_NAME                          "BB_CSI_RST_B"   /*!< Identifier name */
+
+/* QSPI0A_DQS (number AL11), QSPI0A_DQS */
+#define BOARD_INITPINS_QSPI0A_DQS_PERIPHERAL                         LSIO__QSPI0   /*!< Device name: LSIO__QSPI0 */
+#define BOARD_INITPINS_QSPI0A_DQS_SIGNAL                              qspi_a_dqs   /*!< LSIO__QSPI0 signal: qspi_a_dqs */
+#define BOARD_INITPINS_QSPI0A_DQS_PIN_NAME                            QSPI0A_DQS   /*!< Pin name */
+#define BOARD_INITPINS_QSPI0A_DQS_PIN_FUNCTION_ID                SC_P_QSPI0A_DQS   /*!< Pin function id */
+#define BOARD_INITPINS_QSPI0A_DQS_LABEL                             "QSPI0A_DQS"   /*!< Label */
+#define BOARD_INITPINS_QSPI0A_DQS_NAME                              "QSPI0A_DQS"   /*!< Identifier name */
+
+/* QSPI0A_DATA0 (number AK14), QSPI0_DATA0 */
+#define BOARD_INITPINS_QSPI0_DATA0_PERIPHERAL                        LSIO__QSPI0   /*!< Device name: LSIO__QSPI0 */
+#define BOARD_INITPINS_QSPI0_DATA0_SIGNAL                            qspi_a_data   /*!< LSIO__QSPI0 signal: qspi_a_data */
+#define BOARD_INITPINS_QSPI0_DATA0_CHANNEL                                     0   /*!< LSIO__QSPI0 qspi_a_data channel: 0 */
+#define BOARD_INITPINS_QSPI0_DATA0_PIN_NAME                         QSPI0A_DATA0   /*!< Pin name */
+#define BOARD_INITPINS_QSPI0_DATA0_PIN_FUNCTION_ID             SC_P_QSPI0A_DATA0   /*!< Pin function id */
+#define BOARD_INITPINS_QSPI0_DATA0_LABEL                           "QSPI0_DATA0"   /*!< Label */
+#define BOARD_INITPINS_QSPI0_DATA0_NAME                            "QSPI0_DATA0"   /*!< Identifier name */
+
+/* QSPI0A_DATA1 (number AR13), QSPI0_DATA1 */
+#define BOARD_INITPINS_QSPI0_DATA1_PERIPHERAL                        LSIO__QSPI0   /*!< Device name: LSIO__QSPI0 */
+#define BOARD_INITPINS_QSPI0_DATA1_SIGNAL                            qspi_a_data   /*!< LSIO__QSPI0 signal: qspi_a_data */
+#define BOARD_INITPINS_QSPI0_DATA1_CHANNEL                                     1   /*!< LSIO__QSPI0 qspi_a_data channel: 1 */
+#define BOARD_INITPINS_QSPI0_DATA1_PIN_NAME                         QSPI0A_DATA1   /*!< Pin name */
+#define BOARD_INITPINS_QSPI0_DATA1_PIN_FUNCTION_ID             SC_P_QSPI0A_DATA1   /*!< Pin function id */
+#define BOARD_INITPINS_QSPI0_DATA1_LABEL                           "QSPI0_DATA1"   /*!< Label */
+#define BOARD_INITPINS_QSPI0_DATA1_NAME                            "QSPI0_DATA1"   /*!< Identifier name */
+
+/* QSPI0A_DATA2 (number AJ13), QSPI0_DATA2 */
+#define BOARD_INITPINS_QSPI0_DATA2_PERIPHERAL                        LSIO__QSPI0   /*!< Device name: LSIO__QSPI0 */
+#define BOARD_INITPINS_QSPI0_DATA2_SIGNAL                            qspi_a_data   /*!< LSIO__QSPI0 signal: qspi_a_data */
+#define BOARD_INITPINS_QSPI0_DATA2_CHANNEL                                     2   /*!< LSIO__QSPI0 qspi_a_data channel: 2 */
+#define BOARD_INITPINS_QSPI0_DATA2_PIN_NAME                         QSPI0A_DATA2   /*!< Pin name */
+#define BOARD_INITPINS_QSPI0_DATA2_PIN_FUNCTION_ID             SC_P_QSPI0A_DATA2   /*!< Pin function id */
+#define BOARD_INITPINS_QSPI0_DATA2_LABEL                           "QSPI0_DATA2"   /*!< Label */
+#define BOARD_INITPINS_QSPI0_DATA2_NAME                            "QSPI0_DATA2"   /*!< Identifier name */
+
 /*!
  * @addtogroup pin_mux
  * @{

 

0 项奖励
回复
1 解答
3,414 次查看
relax-wu
Contributor IV
0 项奖励
回复
5 回复数
3,415 次查看
relax-wu
Contributor IV
0 项奖励
回复
3,500 次查看
relax-wu
Contributor IV

MCU-SDK:android_build/vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/rear_view_camera

When this function is executed, an error occurs and the program dies

 

//vendor/nxp/mcu-sdk-auto/SDK_MEK-MIMX8QX/devices/MIMX8QX6/drivers/fsl_gpio.c
void GPIO_PinInit(GPIO_Type *base, uint32_t pin, const gpio_pin_config_t *Config)
{
    ......

	/* Enable GPIO clock. */
    CLOCK_EnableClock(s_gpioClock[GPIO_GetInstance(base)]);

    ......
}

 

0 项奖励
回复
3,497 次查看
igorpadykov
NXP Employee
NXP Employee

Hi relax

 

the same IMX8QXP_QSPI0A signals may be used in other ..driver_examples/flexspi sdk example, so

one can try to comment them there.

 

Best regards
igor

0 项奖励
回复
3,461 次查看
relax-wu
Contributor IV

Hi igor

    The configuration steps are simple.
    Now that there is a problem, there are two possibilities:
        1. My configuration is wrong
        2. There is a problem with your SDK(Q10.0.0_2.2.0_AUTO)

    Please feedback to the technical staff to confirm it.

thank you very much

0 项奖励
回复
3,466 次查看
relax-wu
Contributor IV

This test failed, please help to solve it.
There is no way to proceed now.

0 项奖励
回复