Debug UART in M4F

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

Debug UART in M4F

跳至解决方案
1,415 次查看
vinothkumars
Senior Contributor IV

Hi,

 

I am working in SDK - 2.5.1, I have to configure new debug UART in M4 Core1 for IMX8QM-MEK (by default it is using UART0_RTS_B, UART0_CTS_B)

 

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

 

 

Regards,
Vinothkumar Sekar
0 项奖励
回复
1 解答
1,368 次查看
vinothkumars
Senior Contributor IV

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 */

in board.h file for M41_I2C0_SCL/ M41_I2C0_SDA

+#define BOARD_DEBUG_UART_BASEADDR (uint32_t) CM4_1__LPUART
+#define BOARD_DEBUG_UART_INSTANCE 1U
+#define BOARD_DEBUG_UART_SC_RSRC SC_R_M4_1_UART
+#define BOARD_DEBUG_UART_CLKSRC kCLOCK_M4_1_Lpuart
+#define BOARD_UART_IRQ M4_1_LPUART_IRQn
+#define BOARD_UART_IRQ_HANDLER M4_1_LPUART_IRQHandler

 

Regards,
Vinothkumar Sekar

在原帖中查看解决方案

1 回复
1,369 次查看
vinothkumars
Senior Contributor IV

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 */

in board.h file for M41_I2C0_SCL/ M41_I2C0_SDA

+#define BOARD_DEBUG_UART_BASEADDR (uint32_t) CM4_1__LPUART
+#define BOARD_DEBUG_UART_INSTANCE 1U
+#define BOARD_DEBUG_UART_SC_RSRC SC_R_M4_1_UART
+#define BOARD_DEBUG_UART_CLKSRC kCLOCK_M4_1_Lpuart
+#define BOARD_UART_IRQ M4_1_LPUART_IRQn
+#define BOARD_UART_IRQ_HANDLER M4_1_LPUART_IRQHandler

 

Regards,
Vinothkumar Sekar