Skip to content

Commit aaac032

Browse files
committed
Add LPUART1 IO init. Add automated testing for RT1040.
1 parent 0f25c80 commit aaac032

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/test-configs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ jobs:
2222
# arch: riscv
2323
# config-file: ./config/examples/hifive.config
2424

25+
imx_rt1040_test:
26+
uses: ./.github/workflows/test-build-mcux-sdk.yml
27+
with:
28+
arch: arm
29+
config-file: ./config/examples/imx-rt1040.config
30+
2531
imx_rt1050_test:
2632
uses: ./.github/workflows/test-build-mcux-sdk.yml
2733
with:

hal/imx_rt.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,17 @@ void uart_init(void)
715715
lpuart_config_t config;
716716
uint32_t uartClkSrcFreq = 20000000U; /* 20 MHz */
717717

718+
#if UART_BASEADDR == LPUART1
719+
/* Configure the UART IO pins for LPUART1
720+
* Tested with RT1040, RT1050, RT1062 and RT1064
721+
*/
722+
CLOCK_EnableClock(kCLOCK_Iomuxc);
723+
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_12_LPUART1_TX, 0U);
724+
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_13_LPUART1_RX, 0U);
725+
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_12_LPUART1_TX, 0x10B0U);
726+
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_13_LPUART1_RX, 0x10B0U);
727+
#endif
728+
718729
LPUART_GetDefaultConfig(&config);
719730
config.baudRate_Bps = UART_BAUDRATE;
720731
config.enableTx = true;

0 commit comments

Comments
 (0)