UART3 on i.MX 8M Mini

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UART3 on i.MX 8M Mini

Jump to solution
273 Views
josc
Contributor II

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?

Labels (1)
0 Kudos
Reply
1 Solution
149 Views
josc
Contributor II

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!

View solution in original post

0 Kudos
Reply
4 Replies
239 Views
josc
Contributor II

There's no dts when the switches are in Download mode. So UART3 should be free to use.

0 Kudos
Reply
160 Views
joanxie
NXP TechSupport
NXP TechSupport

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";
};

0 Kudos
Reply
150 Views
josc
Contributor II

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!

0 Kudos
Reply
258 Views
joanxie
NXP TechSupport
NXP TechSupport

could you confirm if your dts doesn't use uart3? if linux side uses this, you need disable this firstly, I don't know how your SW is, you can check it by yourself

0 Kudos
Reply