<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックPAD_UART2_RTS_B at low level by default</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/PAD-UART2-RTS-B-at-low-level-by-default/m-p/1475355#M191563</link>
    <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm trying to implement an RS-485 interface by using the UART2 in an i.MX6ULL, actually the&amp;nbsp;UART2_DCE_TX,&amp;nbsp;UART2_DCE_RX and&amp;nbsp;UART2_DCE_CTS. The actual rs-485 transceiver I'm using is &lt;A href="https://www.analog.com/media/en/technical-documentation/data-sheets/485fm.pdf" target="_self"&gt;this LTC485&lt;/A&gt;. The UART2_DCE_CTS pin is connected to the DE pin of LTC485 transceiver, as you can see in this schema (LTC485 is the A1 IC):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="probing_cts.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183651iDA2B0E2581491003/image-size/large?v=v2&amp;amp;px=999" role="button" title="probing_cts.png" alt="probing_cts.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Apparentely, when this is in that way ... the LTC485 sets the rx/tx diff at hight level (~5v3):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rx_tx.jpg" style="width: 800px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183620iBE4345595CAB977D/image-size/large?v=v2&amp;amp;px=999" role="button" title="rx_tx.jpg" alt="rx_tx.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Like when you are writing in the bus... so this affects other equipments that are connected to this bus keeping them in a listening/reading state. And this happens until the OS boots and some application opens the port (/dev/ttymxc1).&lt;BR /&gt;&lt;BR /&gt;I'm actually probing this CTS pin where the red arrow is placed (in the schematic) and I can see this CTS pin is in a high voltage state (~3v3):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cts_signal.jpg" style="width: 800px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183615iEDA6E1567765A2A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="cts_signal.jpg" alt="cts_signal.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I was wondering if playing with PAD_CTL settings for this pin I would get this CTS pin stays in a low voltage level until some application opens this serial port and this CTS pin behaves as usually does. This will prevent to introduce noise in the rs-485 bus.&lt;/P&gt;&lt;P&gt;This is my current DTS (regarding this UART2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;amp;iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_hog_1&amp;gt;;
	imx6ul-evk {
		pinctrl_uart2: uart2grp {
			fsl,pins = &amp;lt;
				MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX   0x1b0b1
				MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX   0x1b0b1
				MX6UL_PAD_UART2_CTS_B__UART2_DCE_CTS    0x110b1
			&amp;gt;;
		};
	};
};

&amp;amp;uart2 {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_uart2&amp;gt;;
	fsl,uart-has-rtscts;
	linux,rs485-enable-at-boot-time;
	status = "okay";
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As you can see I've been playing around with this PAD_CTL config integer (0x110b1) trying to set a pull-down resistor of 100K Ohm as apparently &lt;A href="https://github.com/engicam-stable/linux-engicam-nxp/blob/5.4.70/Documentation/devicetree/bindings/pinctrl/fsl%2Cimx6ul-pinctrl.txt#L18" target="_self"&gt;this document&lt;/A&gt;&amp;nbsp;and the i.MX 6ULL Applications Processor Reference Manual (pag 1819) suggests. However I still measure the CTS_B output with that 3v3 high level.&lt;BR /&gt;&lt;BR /&gt;So I'm wondering if it's possible to achive this "low state by default" behavior by modifying this PAD_CTL register.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you very much.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2022 20:17:07 GMT</pubDate>
    <dc:creator>jfernandz</dc:creator>
    <dc:date>2022-06-16T20:17:07Z</dc:date>
    <item>
      <title>PAD_UART2_RTS_B at low level by default</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PAD-UART2-RTS-B-at-low-level-by-default/m-p/1475355#M191563</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm trying to implement an RS-485 interface by using the UART2 in an i.MX6ULL, actually the&amp;nbsp;UART2_DCE_TX,&amp;nbsp;UART2_DCE_RX and&amp;nbsp;UART2_DCE_CTS. The actual rs-485 transceiver I'm using is &lt;A href="https://www.analog.com/media/en/technical-documentation/data-sheets/485fm.pdf" target="_self"&gt;this LTC485&lt;/A&gt;. The UART2_DCE_CTS pin is connected to the DE pin of LTC485 transceiver, as you can see in this schema (LTC485 is the A1 IC):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="probing_cts.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183651iDA2B0E2581491003/image-size/large?v=v2&amp;amp;px=999" role="button" title="probing_cts.png" alt="probing_cts.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Apparentely, when this is in that way ... the LTC485 sets the rx/tx diff at hight level (~5v3):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rx_tx.jpg" style="width: 800px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183620iBE4345595CAB977D/image-size/large?v=v2&amp;amp;px=999" role="button" title="rx_tx.jpg" alt="rx_tx.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Like when you are writing in the bus... so this affects other equipments that are connected to this bus keeping them in a listening/reading state. And this happens until the OS boots and some application opens the port (/dev/ttymxc1).&lt;BR /&gt;&lt;BR /&gt;I'm actually probing this CTS pin where the red arrow is placed (in the schematic) and I can see this CTS pin is in a high voltage state (~3v3):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cts_signal.jpg" style="width: 800px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183615iEDA6E1567765A2A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="cts_signal.jpg" alt="cts_signal.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I was wondering if playing with PAD_CTL settings for this pin I would get this CTS pin stays in a low voltage level until some application opens this serial port and this CTS pin behaves as usually does. This will prevent to introduce noise in the rs-485 bus.&lt;/P&gt;&lt;P&gt;This is my current DTS (regarding this UART2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;amp;iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_hog_1&amp;gt;;
	imx6ul-evk {
		pinctrl_uart2: uart2grp {
			fsl,pins = &amp;lt;
				MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX   0x1b0b1
				MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX   0x1b0b1
				MX6UL_PAD_UART2_CTS_B__UART2_DCE_CTS    0x110b1
			&amp;gt;;
		};
	};
};

&amp;amp;uart2 {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_uart2&amp;gt;;
	fsl,uart-has-rtscts;
	linux,rs485-enable-at-boot-time;
	status = "okay";
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As you can see I've been playing around with this PAD_CTL config integer (0x110b1) trying to set a pull-down resistor of 100K Ohm as apparently &lt;A href="https://github.com/engicam-stable/linux-engicam-nxp/blob/5.4.70/Documentation/devicetree/bindings/pinctrl/fsl%2Cimx6ul-pinctrl.txt#L18" target="_self"&gt;this document&lt;/A&gt;&amp;nbsp;and the i.MX 6ULL Applications Processor Reference Manual (pag 1819) suggests. However I still measure the CTS_B output with that 3v3 high level.&lt;BR /&gt;&lt;BR /&gt;So I'm wondering if it's possible to achive this "low state by default" behavior by modifying this PAD_CTL register.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 20:17:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PAD-UART2-RTS-B-at-low-level-by-default/m-p/1475355#M191563</guid>
      <dc:creator>jfernandz</dc:creator>
      <dc:date>2022-06-16T20:17:07Z</dc:date>
    </item>
  </channel>
</rss>

