<?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>LPC MicrocontrollersのトピックRe: M4 appears blocked while RTC registers are updating.</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/M4-appears-blocked-while-RTC-registers-are-updating/m-p/580751#M20282</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by philippschrader on Mon Jun 01 17:54:55 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I agree that those issues sound very similar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, Alaric in that post talks about doing two back-to-back RTC updates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm doing only a single one and it still seems like the core is blocked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the function I'm using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
void WriteTimeToRegisters(const DateTime&amp;amp; time) {
&amp;nbsp; // Temporarily disable the RTC.
&amp;nbsp; LPC_RTC-&amp;gt;CCR &amp;amp;= ~RTC_CCR_CLKEN;

&amp;nbsp; // Set the new time.
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_SECOND] = time.second;
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_MINUTE] = time.minute;
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_HOUR] = time.hour;
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_DAYOFMONTH] = time.day_of_month;
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_DAYOFWEEK] = 1;&amp;nbsp; // TODO: Does this matter?
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_DAYOFYEAR] = 1;&amp;nbsp; // TODO: Does this matter?
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_MONTH] = time.month;
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_YEAR] = time.year;

&amp;nbsp; // Re-enable the RTC.
&amp;nbsp; LPC_RTC-&amp;gt;CCR |= RTC_CCR_CLKEN;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a slightly modified version of what LPCOpen's function looks like.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:08:28 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:08:28Z</dc:date>
    <item>
      <title>M4 appears blocked while RTC registers are updating.</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/M4-appears-blocked-while-RTC-registers-are-updating/m-p/580749#M20280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by philippschrader on Fri May 29 10:43:28 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm looking for some insight into some behaviour I'm observing on the LPC4357.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steps to reproduce:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) The M4 sending a message to the M0APP via shared memory to change the time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) M0APP receives message and updates the time by writing the corresponding RTC registers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Everything continues fine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) About a second or two after updating the time, the M4 appears to stop whatever it's doing and just sits there for ~1 second&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I can tell, the M4 is just blocked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Adding assert statements to all the interrupt routines to see if any of them trigger.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Interrupting the processor in the debugger, but it also appears to just wait until the M4 is unblocked and then interrupts whatever code it was running before the M4 got blocked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have any insight or thoughts on what this could be?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Philipp&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:08:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/M4-appears-blocked-while-RTC-registers-are-updating/m-p/580749#M20280</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: M4 appears blocked while RTC registers are updating.</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/M4-appears-blocked-while-RTC-registers-are-updating/m-p/580750#M20281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by starblue on Mon Jun 01 01:48:42 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fwriting-rtc-time-registers-causes-delay-code-execution" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/writing-rtc-time-registers-causes-delay-code-execution&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:08:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/M4-appears-blocked-while-RTC-registers-are-updating/m-p/580750#M20281</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: M4 appears blocked while RTC registers are updating.</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/M4-appears-blocked-while-RTC-registers-are-updating/m-p/580751#M20282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by philippschrader on Mon Jun 01 17:54:55 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I agree that those issues sound very similar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, Alaric in that post talks about doing two back-to-back RTC updates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm doing only a single one and it still seems like the core is blocked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the function I'm using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
void WriteTimeToRegisters(const DateTime&amp;amp; time) {
&amp;nbsp; // Temporarily disable the RTC.
&amp;nbsp; LPC_RTC-&amp;gt;CCR &amp;amp;= ~RTC_CCR_CLKEN;

&amp;nbsp; // Set the new time.
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_SECOND] = time.second;
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_MINUTE] = time.minute;
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_HOUR] = time.hour;
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_DAYOFMONTH] = time.day_of_month;
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_DAYOFWEEK] = 1;&amp;nbsp; // TODO: Does this matter?
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_DAYOFYEAR] = 1;&amp;nbsp; // TODO: Does this matter?
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_MONTH] = time.month;
&amp;nbsp; LPC_RTC-&amp;gt;TIME[RTC_TIMETYPE_YEAR] = time.year;

&amp;nbsp; // Re-enable the RTC.
&amp;nbsp; LPC_RTC-&amp;gt;CCR |= RTC_CCR_CLKEN;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a slightly modified version of what LPCOpen's function looks like.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:08:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/M4-appears-blocked-while-RTC-registers-are-updating/m-p/580751#M20282</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: M4 appears blocked while RTC registers are updating.</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/M4-appears-blocked-while-RTC-registers-are-updating/m-p/580752#M20283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by capiman on Mon Jun 01 22:47:17 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;have you checked where LPC_RTC points to on M0 and if this is equal to user manual?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you reduce the code (e.g. only use accesses to LPC_RTC-&amp;gt;CCR) to narrow the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does same code work on M4, or do you see also there this delay?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:08:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/M4-appears-blocked-while-RTC-registers-are-updating/m-p/580752#M20283</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:08:29Z</dc:date>
    </item>
  </channel>
</rss>

