<?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>Kinetis Software Development KitのトピックRe: Using LPTMR for system time base inspite of OSA</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-LPTMR-for-system-time-base-inspite-of-OSA/m-p/382000#M1007</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jorge, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In KSDK 1.2, how can I have the OSA generate an interrupt driven 1ms timer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I setup my application using the LPTMR to essentially tick time every ms. I would now want the OSA_TimeDelay() feature, but OSA_Init sets up the LPTMR differently than how I'm using it. Specifically OSA_Init selects the 1kHz LPO clock as the source which isn't fast enough for a 1ms clock (it gets divided by two). Obviously I can call OSA_Init first and then overwrite its settings with my own, but that would likely result in unpredictable behaviour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way of changing the OSA to generate a 1ms clock though the API (I don't see one), or should I ditch the LPTMR as the basis of my application's 1ms clock and use something else like the PIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Angus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jul 2015 21:42:45 GMT</pubDate>
    <dc:creator>angusgalloway-b</dc:creator>
    <dc:date>2015-07-08T21:42:45Z</dc:date>
    <item>
      <title>Using LPTMR for system time base inspite of OSA</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-LPTMR-for-system-time-base-inspite-of-OSA/m-p/381998#M1005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm migrating a bare metal project from KL15 to KL17, I use LPTMR in KL15 for my time-base and low power mode.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I see that KL17 has a OSA consuming LPTMR, how can I hang my system time-base to LPTMR inspite of OSA?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Sorry, I'm not quite well versed with all that RTOS mumbo jumbo).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 04:28:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-LPTMR-for-system-time-base-inspite-of-OSA/m-p/381998#M1005</guid>
      <dc:creator>lokuate</dc:creator>
      <dc:date>2015-04-07T04:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using LPTMR for system time base inspite of OSA</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-LPTMR-for-system-time-base-inspite-of-OSA/m-p/381999#M1006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Carlos:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the time with no response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right that the OSA layer uses the LPTMR for its APIs such as &lt;EM&gt;OSA_TimeDelay()&lt;/EM&gt;. However if you do not require any OSA, then you can make use of the LPTMR for your custom time-base as long as you do not call any of the OSA functions requiring timing. The next version of KSDK (&lt;STRONG&gt;v1.2&lt;/STRONG&gt;) will have the option to release the LPTMR from the OSA so you can use it for your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you experience any issues please let us know.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards!,&lt;BR /&gt;Jorge Gonzalez&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 02:49:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-LPTMR-for-system-time-base-inspite-of-OSA/m-p/381999#M1006</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-04-15T02:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using LPTMR for system time base inspite of OSA</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-LPTMR-for-system-time-base-inspite-of-OSA/m-p/382000#M1007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jorge, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In KSDK 1.2, how can I have the OSA generate an interrupt driven 1ms timer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I setup my application using the LPTMR to essentially tick time every ms. I would now want the OSA_TimeDelay() feature, but OSA_Init sets up the LPTMR differently than how I'm using it. Specifically OSA_Init selects the 1kHz LPO clock as the source which isn't fast enough for a 1ms clock (it gets divided by two). Obviously I can call OSA_Init first and then overwrite its settings with my own, but that would likely result in unpredictable behaviour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way of changing the OSA to generate a 1ms clock though the API (I don't see one), or should I ditch the LPTMR as the basis of my application's 1ms clock and use something else like the PIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Angus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 21:42:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-LPTMR-for-system-time-base-inspite-of-OSA/m-p/382000#M1007</guid>
      <dc:creator>angusgalloway-b</dc:creator>
      <dc:date>2015-07-08T21:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using LPTMR for system time base inspite of OSA</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-LPTMR-for-system-time-base-inspite-of-OSA/m-p/382001#M1008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Angus:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually the OSA_Init() sets the LPTMR prescaler to bypassed, see below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52258iC0EF90341CDB6311/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So the actual counter frequency is 1 kHz. You can enable LPTMR interrupts from your application after OSA_Init() and from the ISR function increment the compare value by 1 with &lt;STRONG&gt;LPTMR_HAL_SetCompareValue()&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess this approach should work, although I don't think sharing LPTMR for both OSA and application is ideal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 03:58:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Using-LPTMR-for-system-time-base-inspite-of-OSA/m-p/382001#M1008</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-07-09T03:58:04Z</dc:date>
    </item>
  </channel>
</rss>

