Controlling the peripheral in IMX8 with M4 core

Hi @AhmedMobarez,

No worries, feel free to reach out anytime you want.

Best Regards,
Hiago.

Hello Hiago @hfranco.tx ,

sorry for commenting on an old thread, let me know if I should post this in a new thread, I just have a small question, how did you figure out that pin 35 and 36 on the Ixora could be used for UART and only from the M4 core 1 and not 0 ?

thank you

Hi @AhmedMobarez,

since it’s a simple question related to the topic, we can discuss it in this thread.

I checked the pin_mux.h files inside the “Hello Wolrd” demo. Here is the diff between pin_mx.h from core0 and core1:

--- cm4_core0/pin_mux.h 2022-08-22 11:04:15.000000000 -0300
+++ cm4_core1/pin_mux.h 2022-08-22 11:04:15.000000000 -0300
@@ -14,23 +14,23 @@
  * Definitions
  **********************************************************************************************************************/
 
-/* M40_I2C0_SCL (number AM44), FTDI_M40_UART0_RX */
+/* UART0_RTS_B (number AU45), BB_UART2_RX/J20A[28] */
 /* Routed pin properties */
-#define BOARD_INITPINS_FTDI_M40_UART0_RX_PERIPHERAL                   M40__UART0   /*!< Peripheral name */
-#define BOARD_INITPINS_FTDI_M40_UART0_RX_SIGNAL                          uart_rx   /*!< Signal name */
-#define BOARD_INITPINS_FTDI_M40_UART0_RX_PIN_NAME                   M40_I2C0_SCL   /*!< Routed pin name */
-#define BOARD_INITPINS_FTDI_M40_UART0_RX_PIN_FUNCTION_ID       SC_P_M40_I2C0_SCL   /*!< Pin function id */
-#define BOARD_INITPINS_FTDI_M40_UART0_RX_LABEL               "FTDI_M40_UART0_RX"   /*!< Label */
-#define BOARD_INITPINS_FTDI_M40_UART0_RX_NAME                "FTDI_M40_UART0_RX"   /*!< Identifier */
+#define BOARD_INITPINS_BB_UART2_RX_PERIPHERAL                         DMA__UART2   /*!< Peripheral name */
+#define BOARD_INITPINS_BB_UART2_RX_SIGNAL                                uart_rx   /*!< Signal name */
+#define BOARD_INITPINS_BB_UART2_RX_PIN_NAME                          UART0_RTS_B   /*!< Routed pin name */
+#define BOARD_INITPINS_BB_UART2_RX_PIN_FUNCTION_ID              SC_P_UART0_RTS_B   /*!< Pin function id */
+#define BOARD_INITPINS_BB_UART2_RX_LABEL                  "BB_UART2_RX/J20A[28]"   /*!< Label */
+#define BOARD_INITPINS_BB_UART2_RX_NAME                            "BB_UART2_RX"   /*!< Identifier */
 
-/* M40_I2C0_SDA (number AU51), FTDI_M40_UART0_TX */
+/* UART0_CTS_B (number AW49), BB_UART2_TX/J20A[29] */
 /* Routed pin properties */
-#define BOARD_INITPINS_FTDI_M40_UART0_TX_PERIPHERAL                   M40__UART0   /*!< Peripheral name */
-#define BOARD_INITPINS_FTDI_M40_UART0_TX_SIGNAL                          uart_tx   /*!< Signal name */
-#define BOARD_INITPINS_FTDI_M40_UART0_TX_PIN_NAME                   M40_I2C0_SDA   /*!< Routed pin name */
-#define BOARD_INITPINS_FTDI_M40_UART0_TX_PIN_FUNCTION_ID       SC_P_M40_I2C0_SDA   /*!< Pin function id */
-#define BOARD_INITPINS_FTDI_M40_UART0_TX_LABEL               "FTDI_M40_UART0_TX"   /*!< Label */
-#define BOARD_INITPINS_FTDI_M40_UART0_TX_NAME                "FTDI_M40_UART0_TX"   /*!< Identifier */
+#define BOARD_INITPINS_BB_UART2_TX_PERIPHERAL                         DMA__UART2   /*!< Peripheral name */
+#define BOARD_INITPINS_BB_UART2_TX_SIGNAL                                uart_tx   /*!< Signal name */
+#define BOARD_INITPINS_BB_UART2_TX_PIN_NAME                          UART0_CTS_B   /*!< Routed pin name */
+#define BOARD_INITPINS_BB_UART2_TX_PIN_FUNCTION_ID              SC_P_UART0_CTS_B   /*!< Pin function id */
+#define BOARD_INITPINS_BB_UART2_TX_LABEL                  "BB_UART2_TX/J20A[29]"   /*!< Label */
+#define BOARD_INITPINS_BB_UART2_TX_NAME                            "BB_UART2_TX"   /*!< Identifier */
 
 /*!
  * @addtogroup pin_mux
@@ -57,7 +57,7 @@
  * @param ipc scfw ipchandle.
  *
  */
-void BOARD_InitPins(sc_ipc_t ipc);                         /*!< Function assigned for the core: Cortex-M4F[cm4_core0] */
+void BOARD_InitPins(sc_ipc_t ipc);                         /*!< Function assigned for the core: Cortex-M4F[cm4_core1] */

Now you can go to the Apalis iMX8 datasheet and look for pins M40_I2C0_SCL (core 0) and UART0_RTS_B (core 1). On the Ixora board, only the pin UART0_RTS_B is available in the header pin ( you can check the Ixora Datasheet as well), that’s how I found which core was available for me.

Feel free to ask any questions you might have.

Best Regards,
Hiago.

1 Like

Hi hiago @hfranco.tx ,

I have tried this solution and it does work for debugging serial core 1 on the ixora board. my question is whether for core 0 can’t be treated the same way? i mean core 0 is also debugged with the same pins as core 1 by equating the pin names in pin_mux.h

can the process not be that simple or how? or is there another way so that I can debug serial core 0 on the ixora board?

thank you

Hi @Azkaaa

Can I ask you to open a new thread with your issue?
This topic is already marked as solved so we won’t be able to track your status.

Hi allan,

thanks for the reply, I have done to open a new topic. i apologize in advance for my ignorance.

Best Regards,
Azka