<?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>topic Re: imx8mm uart4 read control register error in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-uart4-read-control-register-error/m-p/1931176#M227270</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;This can help:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/IMX8-mini-UART4/td-p/935322" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors/IMX8-mini-UART4/td-p/935322&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2024 13:55:35 GMT</pubDate>
    <dc:creator>Bio_TICFSL</dc:creator>
    <dc:date>2024-08-13T13:55:35Z</dc:date>
    <item>
      <title>imx8mm uart4 read control register error</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-uart4-read-control-register-error/m-p/1930945#M227255</link>
      <description>&lt;P&gt;my platform base on imx8mm, and found the uar4 controller driver will be crash when read the uar4 register. my uart4 dts setting as follow:&lt;/P&gt;&lt;P&gt;uart4: serial@30a60000 {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;compatible = "fsl,imx8mm-uart", "fsl,imx6q-uart";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;reg = &amp;lt;0x30a60000 0x10000&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;interrupts = &amp;lt;GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clocks = &amp;lt;&amp;amp;clk IMX8MM_CLK_UART4_ROOT&amp;gt;,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;amp;clk IMX8MM_CLK_UART4_ROOT&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clock-names = "ipg", "per";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dmas = &amp;lt;&amp;amp;sdma1 28 4 0&amp;gt;, &amp;lt;&amp;amp;sdma1 29 4 0&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dma-names = "rx", "tx";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status = "disabled";&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;amp;uart4 {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pinctrl-names = "default";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pinctrl-0 = &amp;lt;&amp;amp;pinctrl_uart4&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status = "okay";&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;the uart4 controller driver code file is : linux-imx/drivers/tty/serial/imx.c, the root cause code is :&lt;/P&gt;&lt;P&gt;sport-&amp;gt;ucr1 = readl(sport-&amp;gt;port.membase + UCR1);&lt;BR /&gt;sport-&amp;gt;ucr2 = readl(sport-&amp;gt;port.membase + UCR2);&lt;BR /&gt;sport-&amp;gt;ucr3 = readl(sport-&amp;gt;port.membase + UCR3);&lt;BR /&gt;sport-&amp;gt;ucr4 = readl(sport-&amp;gt;port.membase + UCR4);&lt;BR /&gt;sport-&amp;gt;ufcr = readl(sport-&amp;gt;port.membase + UFCR);&lt;/P&gt;&lt;P&gt;if I disable the uart4 driver,&amp;nbsp; and use the devmem cmd to read this register directly(such as "devmem 0x30a60000"), same crash issue will be observed, and the crash log as follow.&lt;/P&gt;&lt;P&gt;[ 57.656313] audit: type=1701 audit(1599913043.500:3): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=1069 comm="devmem" exe="/usr/bin/busybox" sig=7 res=1&lt;BR /&gt;Bus error (core dumped)&lt;/P&gt;&lt;P&gt;Tt seems that it was hardware issue, please help to check. the imx.c can be found in attach file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 08:24:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mm-uart4-read-control-register-error/m-p/1930945#M227255</guid>
      <dc:creator>jxingyang</dc:creator>
      <dc:date>2024-08-13T08:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mm uart4 read control register error</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-uart4-read-control-register-error/m-p/1931114#M227266</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you for providing the detailed information.&lt;BR /&gt;The crash you're experiencing, indicated by the "Bus error (core dumped)" message, suggests a potential hardware or software issue related to the UART4 controller.&lt;BR /&gt;Potential Causes and Troubleshooting Steps:&lt;BR /&gt;1.&amp;nbsp;Incorrect Memory Mapping:&amp;nbsp;Verify Register Addresses: Double-check the register addresses used in your driver code (sport-&amp;gt;port.membase + UCRx) against the device's datasheet. Consider Overlapping Memory Regions: Ensure there are no overlapping memory regions that might cause conflicts.&lt;BR /&gt;&lt;BR /&gt;2.&amp;nbsp;Clock Configuration:&amp;nbsp;Check Clock Settings: Verify that the UART4 clock settings in the device tree are correct and match the hardware configuration. Test Different Clock Frequencies: Experiment with different clock frequencies to see if it affects the behavior.&lt;BR /&gt;&lt;BR /&gt;3.&amp;nbsp;Interrupt Handling:&amp;nbsp;Interrupt Configuration: Ensure the UART4 interrupt is configured correctly in the device tree and driver code. Interrupt Handler: Check for potential issues in the interrupt handler that might lead to unexpected behavior.&lt;BR /&gt;&lt;BR /&gt;4.&amp;nbsp;Hardware Issues:&amp;nbsp;Test with Different UART: If possible, try using a different UART to isolate the issue. Examine Hardware Documentation: Refer to the IMX8MM datasheet for any specific requirements or limitations related to the UART4 controller.&lt;BR /&gt;&lt;BR /&gt;5.&amp;nbsp;Debugging Techniques:&amp;nbsp;Print Register Values: Add print statements to display the values of UCR registers before the crash to identify any abnormal values. Use a Debugger: Employ a debugger to step through the code and examine the state of variables and registers at the time of the crash. Core Dump Analysis: Analyze the core dump file to identify the root cause of the crash.&lt;BR /&gt;&lt;BR /&gt;Additional Considerations:&lt;BR /&gt;DMA Configuration: If you're using DMA for UART transfers, ensure the DMA channels are configured correctly and not interfering with the UART operation.&lt;BR /&gt;Power Supply: A stable power supply is crucial for correct operation. Check for any voltage drops or noise issues.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;By systematically addressing these potential causes and utilizing debugging techniques, you should be able to identify and resolve the UART4 crash issue.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 12:00:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mm-uart4-read-control-register-error/m-p/1931114#M227266</guid>
      <dc:creator>alfredo594</dc:creator>
      <dc:date>2024-08-13T12:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mm uart4 read control register error</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-uart4-read-control-register-error/m-p/1931176#M227270</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;This can help:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/IMX8-mini-UART4/td-p/935322" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors/IMX8-mini-UART4/td-p/935322&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 13:55:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mm-uart4-read-control-register-error/m-p/1931176#M227270</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2024-08-13T13:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mm uart4 read control register error</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mm-uart4-read-control-register-error/m-p/1931667#M227296</link>
      <description>&lt;P&gt;RDC register need set to rw access allowed.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 06:36:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mm-uart4-read-control-register-error/m-p/1931667#M227296</guid>
      <dc:creator>jxingyang</dc:creator>
      <dc:date>2024-08-14T06:36:44Z</dc:date>
    </item>
  </channel>
</rss>

