<?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: LPC5410x SCT0 crashes mcu in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-SCT0-crashes-mcu/m-p/949643#M37725</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was it. thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jul 2019 09:38:27 GMT</pubDate>
    <dc:creator>svensavic</dc:creator>
    <dc:date>2019-07-09T09:38:27Z</dc:date>
    <item>
      <title>LPC5410x SCT0 crashes mcu</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-SCT0-crashes-mcu/m-p/949641#M37723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get SCT0 working, but my mcu keeps crashing into hardfault handler. This would normally indicate&amp;nbsp;trying to write to the wrong memory address (in this case anyway). So, looking at the memory address&amp;nbsp;for SCT0 in memory mapping table it is stated that SCT0 is starting at 0x1C018000, which seems to be aligning with this part of my code:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;LPC_SCT0-&amp;gt;CONFIG |= _BV(0) | (1&amp;lt;&amp;lt;17); //set 32bit timer, autolimit on mat0&lt;/P&gt;&lt;P&gt;LPC_SCT0-&amp;gt;EVENT[0].STATE = 1;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This part seems to be Ok, from what I can observe in the debugger under SCT registers. It seems that config does change value and event is set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing else was configured between that call and next one that&amp;nbsp;crashes my mcu:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;STRONG&gt;LPC_SCT0-&amp;gt;MATCH[1].U = 10;&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt; LPC_SCT0-&amp;gt;MATCHREL[1].U = 10;&lt;/P&gt;&lt;P&gt;LPC_SCT0-&amp;gt;EVENT[1].STATE = 1;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I verified the address of MATCH[1].U (32 bit entry) with command: &lt;EM&gt;(uint32_t *)&amp;amp;LPC_SCT0-&amp;gt;MATCH[1].U&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;and I am getting value of:&amp;nbsp;&lt;STRONG style="text-decoration: underline; "&gt;0x1c018104&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;104 from the address I have configured for MATCH[1] does align with the offset in the user manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What could cause MCU to crash by assigning value to the valid memory address ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jul 2019 21:21:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-SCT0-crashes-mcu/m-p/949641#M37723</guid>
      <dc:creator>svensavic</dc:creator>
      <dc:date>2019-07-07T21:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5410x SCT0 crashes mcu</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-SCT0-crashes-mcu/m-p/949642#M37724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="300195" data-username="svensavic" href="https://community.nxp.com/people/svensavic"&gt;Sven Savic&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your interest in NXP Semiconductor products and &lt;BR /&gt;for the opportunity to serve you.&lt;BR /&gt;According to the RM, Match registers can be read at any time. Writing to the MATCH_L, MATCH_H, or unified register is only allowed when the corresponding counter is halted (HALT bits are set to 1 in&lt;BR /&gt;the CTRL register). So please assure the HALT bit is 1 when writing the Match register.&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2019 07:19:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-SCT0-crashes-mcu/m-p/949642#M37724</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2019-07-08T07:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5410x SCT0 crashes mcu</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-SCT0-crashes-mcu/m-p/949643#M37725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was it. thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2019 09:38:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5410x-SCT0-crashes-mcu/m-p/949643#M37725</guid>
      <dc:creator>svensavic</dc:creator>
      <dc:date>2019-07-09T09:38:27Z</dc:date>
    </item>
  </channel>
</rss>

