how to RS485 in devicetree IMX8mp

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

how to RS485 in devicetree IMX8mp

795件の閲覧回数
Cyriactoms
Contributor II

I am using  custom board which is designed based on imx8mp evk board having imx8mp. I need to configure rs485 for uart1 and uart3 i have created one based on my knowledge but data transfer is not happening in it. can anyone help to figureout the issue with it 

&uart1{
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
assigned-clocks = <&clk IMX8MP_CLK_UART1>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
fsl,uart-has-rtscts;
linux,rs485-enabled-at-boot-time;
rs485-rts-active-low;
rs485-rx-during-tx;
rs485-rts-delay = <0 0>;
status = "okay";
};
&uart3{
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
assigned-clocks = <&clk IMX8MP_CLK_UART3>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
linux,rs485-enabled-at-boot-time;
rs485-rts-active-low;
rs485-rx-during-tx;
rs485-rts-delay = <0 0>;
status = "okay";

};
pinctrl_uart1: rs485_01{
fsl,pins =<
MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x00000106
MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x00000106
MX8MP_IOMUXC_SD1_DATA0__UART1_DCE_RTS 0x00000106
MX8MP_IOMUXC_SD1_DATA1__UART1_DCE_CTS 0x00000106

>;
};
pinctrl_uart3: rs485_02{
fsl,pins =<
MX8MP_IOMUXC_UART3_RXD__UART3_DCE_RX 0x00000106
MX8MP_IOMUXC_UART3_TXD__UART3_DCE_TX 0x00000106
MX8MP_IOMUXC_SD1_STROBE__UART3_DTE_RTS 0x00000106
MX8MP_IOMUXC_SD1_RESET_B__UART3_DTE_CTS 0x00000106
 
 
ラベル(1)
タグ(1)
0 件の賞賛
返信
4 返答(返信)

772件の閲覧回数
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @Cyriactoms 

I hope you are doing very well.

 

I noticed that in your UART3 configuration, you are mixing DCE and DTE modes for the TX/RX and RTS/CTS pins. This inconsistency can lead to improper signal routing. Please ensure that all pins for a UART instance use the same mode (either DCE or DTE).

Also, the rs485-rts-active-low property assumes your transceiver enables transmission when RTS is low, please be sure about it.

 

Several of your RTS/CTS pins are muxed from SD1 interface signals. Ensure that usdhc1 is disabled.

 

I hope this can helps to you.

 

Best regards,

Salas.

0 件の賞賛
返信

750件の閲覧回数
Cyriactoms
Contributor II
rs485-rts-active-low if i didnt add this function means what is the default state
0 件の賞賛
返信

744件の閲覧回数
Cyriactoms
Contributor II

the DTE pins i got it from config tools when i do the pinmux  ihave atteached the screenshot on it

0 件の賞賛
返信

735件の閲覧回数
Cyriactoms
Contributor II
Is there anyother defconfig need to be added for the rs485 to be enabled
0 件の賞賛
返信