<?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: Uart Hard fault while initialization in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Uart-Hard-fault-while-initialization/m-p/1348621#M12269</link>
    <description>&lt;P&gt;Fortunately I have solved the issue I was facing.&lt;/P&gt;&lt;P&gt;I discovered that I was indexing a wrong address of the LPUART1, that was causing the hard-fault. So I guess I won't need further assistance, at least for now :D.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Sep 2021 18:14:21 GMT</pubDate>
    <dc:creator>Ahmed_Mohsen_Shoheb</dc:creator>
    <dc:date>2021-09-29T18:14:21Z</dc:date>
    <item>
      <title>Uart Hard fault while initialization</title>
      <link>https://community.nxp.com/t5/S32K/Uart-Hard-fault-while-initialization/m-p/1346279#M12223</link>
      <description>&lt;P&gt;Hello, I having a "hard fault" when trying to initialize LPUART1 in Cortex-M4 S32K144 EVB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;the situation is:&lt;/P&gt;&lt;P&gt;1- I enable the peripheral clock ( this is by setting CGC bit in PCC_LPUART1 register).&lt;/P&gt;&lt;P&gt;I'm giving the peripheral directly from SOSC clock, which is 16MHz.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2- inside my startup code, CSTartup, I have:&lt;/P&gt;&lt;P&gt;A- defined "CSTS32K_coUSE_LPUART1_RxTx_ERR_IRQHandler" which is the interrupt that is gonna fire when Uart interrupt happens. Moreover, priority is defined using macro "CSTS32K_u8LPUART1_RxTx_ERR_PRIORITY" (has the value of 7).&lt;/P&gt;&lt;P&gt;B- inside the "CSTS32K_vidLPUART1_RxTx_ERR_IRQHandler" handler "LPUA&lt;/P&gt;&lt;P&gt;RT1_Handler();" is added to execute LPUART1 code when Uart interrupt fires.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issue: Once I try to access CTRL register of LPUART1, "CSTS32K_vidHardFault_Handler" is fired.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notes: I have looked into similar issue posted on the community, it's solution was to add "-mcpu=cortex-m4&lt;BR /&gt;-mthumb" into my linker options. However, I found out that these options are already added, so I guess that's not the problem.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Sep 2021 08:57:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Uart-Hard-fault-while-initialization/m-p/1346279#M12223</guid>
      <dc:creator>Ahmed_Mohsen_Shoheb</dc:creator>
      <dc:date>2021-09-26T08:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Uart Hard fault while initialization</title>
      <link>https://community.nxp.com/t5/S32K/Uart-Hard-fault-while-initialization/m-p/1348621#M12269</link>
      <description>&lt;P&gt;Fortunately I have solved the issue I was facing.&lt;/P&gt;&lt;P&gt;I discovered that I was indexing a wrong address of the LPUART1, that was causing the hard-fault. So I guess I won't need further assistance, at least for now :D.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 18:14:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Uart-Hard-fault-while-initialization/m-p/1348621#M12269</guid>
      <dc:creator>Ahmed_Mohsen_Shoheb</dc:creator>
      <dc:date>2021-09-29T18:14:21Z</dc:date>
    </item>
  </channel>
</rss>

