How to use UART3 on Cortex-M4 processor in i.MX8MQ

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to use UART3 on Cortex-M4 processor in i.MX8MQ

ソリューションへジャンプ
1,197件の閲覧回数
kerazus
Contributor II

Hi, I am using to i.MX8MQ and adjusting Cortex-M4 processor.  I ran application hello_world_app and then does settings according to UART3 but I couldn't run application. I showed settings below.

board.h 
#define BOARD_DEBUG_UART_BASEADDR UART3_BASE
#define BOARD_DEBUG_UART_INSTANCE 3U
#define BOARD_DEBUG_UART_CLK_FREQ \
CLOCK_GetPllFreq(kCLOCK_SystemPll1Ctrl) / (CLOCK_GetRootPreDivider(kCLOCK_RootUart3)) / \
(CLOCK_GetRootPostDivider(kCLOCK_RootUart3)) / 10
#define BOARD_UART_IRQ UART3_IRQn
#define BOARD_UART_IRQ_HANDLER UART3_IRQHandler
board.c 
CLOCK_EnableClock(kCLOCK_Uart3);

clock_config.c 

CLOCK_SetRootMux(kCLOCK_RootUart3, kCLOCK_UartRootmuxSysPll1Div10); 
CLOCK_SetRootDivider(kCLOCK_RootUart3, 1U, 1U); 

pin_mux.c 

IOMUXC_SetPinMux(IOMUXC_UART3_RXD_UART3_RX, 0U);
IOMUXC_SetPinConfig(IOMUXC_UART3_RXD_UART3_RX,
IOMUXC_SW_PAD_CTL_PAD_DSE(6U) |
IOMUXC_SW_PAD_CTL_PAD_SRE(1U) |
IOMUXC_SW_PAD_CTL_PAD_PUE_MASK);
IOMUXC_SetPinMux(IOMUXC_UART3_TXD_UART3_TX, 0U);
IOMUXC_SetPinConfig(IOMUXC_UART3_TXD_UART3_TX,
IOMUXC_SW_PAD_CTL_PAD_DSE(6U) |
IOMUXC_SW_PAD_CTL_PAD_SRE(1U) |
IOMUXC_SW_PAD_CTL_PAD_PUE_MASK);

I made the above settings on UART3 but I couldn't get UART3 to work. Do I need to make the necessary settings in the device tree files for UART3 enabled? Is the above settings enough? If enough Why I couldn't run UART3? For example device tree settings:

スポイラ
 
&uart3 {
        ...
        status = "disabled"; // or status = "enabled"
};

 

1 解決策
1,136件の閲覧回数
kerazus
Contributor II

Hi AldoG,

When I did settings in above, error fixed. I measured wrong.

Thank you for answer.

Best Regards.

元の投稿で解決策を見る

2 返答(返信)
1,169件の閲覧回数
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Your configuration seems ok, I believe that you have disabled the UART3 from the device tree as well.

You do not mention if you’re testing this in one of our EVKs, but if yes how are you actually testing this?
Since UART3 is connected to the BT and it is not exposed.

Best regards,
Aldo.

0 件の賞賛
返信
1,137件の閲覧回数
kerazus
Contributor II

Hi AldoG,

When I did settings in above, error fixed. I measured wrong.

Thank you for answer.

Best Regards.