Hi,
I am working on IMX8QM Custom board which is don't have M4 debug UART (UART0_RTS_B and UART0_CTS_B).
So, I take it external connection from the Hardware lines (M41_I2C0_SDA, M41_I2C0_SCL) and configures those line as UART in Software
I configured M41_I2C0_SDA and M41_I2C0_SCL as debug UART (M41_UART0_TX, M41_UART0_RX) for DMA__LPUART2, But, debug uart is not working
sc_pad_set_all(ipc, SC_P_M41_I2C0_SCL, 1U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* 1 - M41_UART0_RX*/
sc_pad_set_all(ipc, SC_P_M41_I2C0_SDA, 1U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* 1 - M41_UART0_TX */
what are the things have to configure in board.h file for M41_I2C0_SCL/ M41_I2C0_SDA
#define BOARD_DEBUG_UART_BASEADDR (uint32_t) DMA__LPUART2
#define BOARD_DEBUG_UART_INSTANCE 4U
#define BOARD_DEBUG_UART_SC_RSRC SC_R_UART_2
#define BOARD_DEBUG_UART_CLKSRC kCLOCK_DMA_Lpuart2
#define BOARD_UART_IRQ DMA_UART2_INT_IRQn
#define BOARD_UART_IRQ_HANDLER DMA_UART2_INT_IRQHandler
Note: Make these pad as movable already
rm_set_pad_movable(pt_boot, SC_P_M41_I2C0_SCL, SC_P_M41_I2C0_SCL, SC_TRUE));
rm_set_pad_movable(pt_boot, SC_P_M41_I2C0_SDA, SC_P_M41_I2C0_SDA, SC_TRUE));
Let me know what are the things I have to configure in board.h for new debug uart
Regards,
Vinothkumar Sekar