Hi,
I try to use UART3 on i.MX 8M Mini LPDDR4 EVKB M4 core but I'm not getting any signals. I'm using the evkmimx8mm_iuart_interrupt_transfer example. I edited 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_FSEL(2U));
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_FSEL(2U));
I also had to edit the function BOARD_BootClockRUN() in clock_config.c:
CLOCK_SetRootMux(kCLOCK_RootUart3, kCLOCK_UartRootmuxSysPll1Div10);
CLOCK_SetRootDivider(kCLOCK_RootUart3, 1U, 1U);
CLOCK_EnableClock(kCLOCK_Uart3);
And I of course changed the definitions in main.c:
#define DEMO_UART UART3
#define DEMO_UART_CLK_FREQ \
CLOCK_GetPllFreq(kCLOCK_SystemPll1Ctrl) / (CLOCK_GetRootPreDivider(kCLOCK_RootUart3)) / \ (CLOCK_GetRootPostDivider(kCLOCK_RootUart3)) / 10
The Boot Switches are in Download Mode and I'm uploading the code via J-Link. I also configured UART3 in RDC. Therefore should UART3 be accessible with the M4, right?
I connected Pin 8, which should be UART3 TX, from the Expansion Connector J1003 on an oscilloscope to detect signals but I can't see anything. What am I missing here?
已解决! 转到解答。
I could fix the issue by using the correct PinMux configuration. Instead of IOMUXC_UART3_RXD_UART3_RX and IOMUXC_UART3_TXD_UART3_TX I'm using IOMUXC_ECSPI1_SCLK_UART3_RX and IOMUXC_ECSPI1_MOSI_UART3_TX now.
Thank you for your help!
do you dts has this? if yes, you need set to "disabled," pls double check it
linux-imx/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi at lf-6.6.y · nxp-imx/linux-imx · GitHub
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
assigned-clocks = <&clk IMX8MM_CLK_UART3>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
fsl,uart-has-rtscts;
status = "okay";
};
I could fix the issue by using the correct PinMux configuration. Instead of IOMUXC_UART3_RXD_UART3_RX and IOMUXC_UART3_TXD_UART3_TX I'm using IOMUXC_ECSPI1_SCLK_UART3_RX and IOMUXC_ECSPI1_MOSI_UART3_TX now.
Thank you for your help!