MIMXRT1020-EVK Arduino connector UART setting

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

MIMXRT1020-EVK Arduino connector UART setting

跳至解决方案
1,112 次查看
CarlLee
Contributor III

I have the MIMXRT1020-EVK board for testing.

There is UART function pins in the Arduino connector. How to set the UART pins function?

I try to modify the sample code from evkmimxrt1020_lpuart_interrupt.

#define DEMO_LPUART LPUART1
#define DEMO_LPUART_IRQn LPUART1_IRQn
#define DEMO_LPUART_IRQHandler LPUART1_IRQHandler

I change the "LPUART1" to "LPUART2" but the uart in the Arduino connector is not function.

Please advise,

Thanks

Carl

0 项奖励
回复
1 解答
1,092 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi @CarlLee ,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Besides the above configuration, it also needs to initialize the UART pins.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
----------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,089 次查看
CarlLee
Contributor III

Dear Jeremy Zhou,

Thanks for your answer.

It is solved by further setting the pins as follows.

//set lpUART2 io pins
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_08_LPUART2_TX, 0U);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_09_LPUART2_RX, 0U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_08_LPUART2_TX, 0x10B0U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_09_LPUART2_RX, 0x10B0U);

 

 

1,093 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi @CarlLee ,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Besides the above configuration, it also needs to initialize the UART pins.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
----------------------------------------------------------------------------

0 项奖励
回复