UART3 on i.MX 8M Mini

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART3 on i.MX 8M Mini

ソリューションへジャンプ
361件の閲覧回数
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?

ラベル(1)
0 件の賞賛
返信
1 解決策
237件の閲覧回数
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 件の賞賛
返信
4 返答(返信)
327件の閲覧回数
josc
Contributor II

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

0 件の賞賛
返信
248件の閲覧回数
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 件の賞賛
返信
238件の閲覧回数
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 件の賞賛
返信
346件の閲覧回数
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 件の賞賛
返信