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
已解决! 转到解答。
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.
----------------------------------------------------------------------------
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);
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.
----------------------------------------------------------------------------