<?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 lpc824 LpcOpen Stopwatch and RIT ... possible problem in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc824-LpcOpen-Stopwatch-and-RIT-possible-problem/m-p/570216#M18105</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by efiLabs on Sun Dec 14 22:18:07 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;friends :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after creating my own timer class i had to revisit StopWatch_Init() and StopWatch_Start() where i took a few ideas from&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;my code didn't work right on timer over-runs and i stared&amp;nbsp; at the LpcOpen code until i noticed that the 31 bit mask had one "F" to few and afterwards my code worked&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sample copied from LpcOpen&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in StopWatch_Init() :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_MRT_SetInterval(LPC_MRT_CH1, 0x7ffffff | MRT_INTVAL_LOAD);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in StopWatch_Start() :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;return 0x7ffffff - Chip_MRT_GetTimer(LPC_MRT_CH1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unless lpcopen has something else in mind, i consider it wrong it should contain 0x7FFFFFFF&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it works for me now&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers efiLabs&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:11:37 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:11:37Z</dc:date>
    <item>
      <title>lpc824 LpcOpen Stopwatch and RIT ... possible problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc824-LpcOpen-Stopwatch-and-RIT-possible-problem/m-p/570216#M18105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by efiLabs on Sun Dec 14 22:18:07 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;friends :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after creating my own timer class i had to revisit StopWatch_Init() and StopWatch_Start() where i took a few ideas from&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;my code didn't work right on timer over-runs and i stared&amp;nbsp; at the LpcOpen code until i noticed that the 31 bit mask had one "F" to few and afterwards my code worked&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sample copied from LpcOpen&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in StopWatch_Init() :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_MRT_SetInterval(LPC_MRT_CH1, 0x7ffffff | MRT_INTVAL_LOAD);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in StopWatch_Start() :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;return 0x7ffffff - Chip_MRT_GetTimer(LPC_MRT_CH1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unless lpcopen has something else in mind, i consider it wrong it should contain 0x7FFFFFFF&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it works for me now&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers efiLabs&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:11:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc824-LpcOpen-Stopwatch-and-RIT-possible-problem/m-p/570216#M18105</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:11:37Z</dc:date>
    </item>
  </channel>
</rss>

