<?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: rtc_15xx.h Chip_RTC_ClearStatus Bug? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/rtc-15xx-h-Chip-RTC-ClearStatus-Bug/m-p/514443#M690</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by 1234567890 on Sat Jun 13 05:40:08 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Original function seems to be wrong. It's just reading the register. Seems to be a copy&amp;amp;paste error from Chip_RTC_GetStatus(). Parameter uint32_t stsMask isn't used in the function...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But your solution is wrong as well: You write '0' to the bits.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UM says: "Writing a 1 clears this bit."&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:12:00 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:12:00Z</dc:date>
    <item>
      <title>rtc_15xx.h Chip_RTC_ClearStatus Bug?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/rtc-15xx-h-Chip-RTC-ClearStatus-Bug/m-p/514442#M689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by frh on Thu Jun 11 17:17:45 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[color=#f00]Update 6/12/15: Looks like I posted to the wrong forum: rookie mistake. Found more on this will repost on LPC Open forum. Moderator, (if there is one), please remove this.[/color]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm following the lpc_open v2.08c example code for the RTC and it's not working. In my copy of rtc_15xx.h I find the following definitioins with identical implementations and I think it's incorrect in the case of the "Clear" function. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shouldn't something like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;pRTC-&amp;gt;CTRL &amp;amp;= ~stsMask;&amp;nbsp; // corrected from original post&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;precede the return?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;/**
 * @briefClears latched RTC statuses
 * @parampRTC: The base address of RTC block
 * @paramstsMask: OR'ed status bits to clear
 * @returnNothing
 * @noteUse and OR'ed stsMask value of RTC_CTRL_OFD, RTC_CTRL_ALARM1HZ,
 *and RTC_CTRL_WAKE1KHZ to clear specific RTC states.
 */
STATIC INLINE uint32_t Chip_RTC_ClearStatus(LPC_RTC_T *pRTC, uint32_t stsMask)
{
return pRTC-&amp;gt;CTRL;
}

/**
 * @briefReturn RTC control/status register
 * @parampRTC: The base address of RTC block
 * @returnThe current RTC control/status register
 * @noteMask the return value with a RTC_CTRL_* definitions to determine
 *which bits are set. For example, mask the return value with
 *RTC_CTRL_ALARM1HZ to determine if the alarm interrupt is pending.
 */
STATIC INLINE uint32_t Chip_RTC_GetStatus(LPC_RTC_T *pRTC)
{
return pRTC-&amp;gt;CTRL;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:11:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/rtc-15xx-h-Chip-RTC-ClearStatus-Bug/m-p/514442#M689</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: rtc_15xx.h Chip_RTC_ClearStatus Bug?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/rtc-15xx-h-Chip-RTC-ClearStatus-Bug/m-p/514443#M690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by 1234567890 on Sat Jun 13 05:40:08 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Original function seems to be wrong. It's just reading the register. Seems to be a copy&amp;amp;paste error from Chip_RTC_GetStatus(). Parameter uint32_t stsMask isn't used in the function...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But your solution is wrong as well: You write '0' to the bits.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UM says: "Writing a 1 clears this bit."&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/rtc-15xx-h-Chip-RTC-ClearStatus-Bug/m-p/514443#M690</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: rtc_15xx.h Chip_RTC_ClearStatus Bug?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/rtc-15xx-h-Chip-RTC-ClearStatus-Bug/m-p/514444#M691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by frh on Sat Jun 13 13:54:12 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the feedback. You're right about the error. I gave a better answer when I reposted (but still to the wrong forum: the first time it was an honest mistake, the second time a really dumb one). It's &lt;/SPAN&gt;&lt;A href="http://http://www.lpcware.com/content/forum/bug-report-lpcopen-v208c-rtc15xxh-chiprtcclearstatus-does-nothing"&gt;here&lt;/A&gt;&lt;SPAN&gt;, FWIW.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/rtc-15xx-h-Chip-RTC-ClearStatus-Bug/m-p/514444#M691</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: rtc_15xx.h Chip_RTC_ClearStatus Bug?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/rtc-15xx-h-Chip-RTC-ClearStatus-Bug/m-p/514445#M692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by frh on Sat Jun 13 13:54:14 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the feedback. You're right about the error. I gave a better answer when I reposted (but still to the wrong forum: the first time it was an honest mistake, the second time a really dumb one). It's &lt;/SPAN&gt;&lt;A href="http://http://www.lpcware.com/content/forum/bug-report-lpcopen-v208c-rtc15xxh-chiprtcclearstatus-does-nothing"&gt;here&lt;/A&gt;&lt;SPAN&gt;, FWIW.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:12:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/rtc-15xx-h-Chip-RTC-ClearStatus-Bug/m-p/514445#M692</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:12:01Z</dc:date>
    </item>
  </channel>
</rss>

