<?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 Problem running a periodic timer and one shot timer in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-running-a-periodic-timer-and-one-shot-timer/m-p/812781#M49332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a K64 and my code needs to run 2 types of timers in 2 different tasks.&lt;/P&gt;&lt;P&gt;One timer is a periodic timer and is set up with a call to _timer_start_periodic_every function, and the period is 100mS. The timer works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other timer is a one shot timer and is set up with a call to _timer_start_oneshot_after function, and the time is between 1 and 1000 seconds. The will be very infrequent, but when I invoke the code, the &lt;SPAN&gt;_timer_start_oneshot_after&amp;nbsp;&lt;/SPAN&gt;function stops at the _lwsem_wait, in the&amp;nbsp;_timer_start_oneshot_after_internal function, and never returns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I remove the periodic timer and invoke the code for the one shot timer, the one shot works fine, so I verified both timers work by themselves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it not possible to run 2 timers? Or a combination of timers? I have tried adjusting the timer priority (1, 2, 10)&amp;nbsp; and stack size (10k for verifying this isn't the problem), but it doesn't seem to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Nov 2018 17:39:23 GMT</pubDate>
    <dc:creator>larrydemuth</dc:creator>
    <dc:date>2018-11-07T17:39:23Z</dc:date>
    <item>
      <title>Problem running a periodic timer and one shot timer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-running-a-periodic-timer-and-one-shot-timer/m-p/812781#M49332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a K64 and my code needs to run 2 types of timers in 2 different tasks.&lt;/P&gt;&lt;P&gt;One timer is a periodic timer and is set up with a call to _timer_start_periodic_every function, and the period is 100mS. The timer works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other timer is a one shot timer and is set up with a call to _timer_start_oneshot_after function, and the time is between 1 and 1000 seconds. The will be very infrequent, but when I invoke the code, the &lt;SPAN&gt;_timer_start_oneshot_after&amp;nbsp;&lt;/SPAN&gt;function stops at the _lwsem_wait, in the&amp;nbsp;_timer_start_oneshot_after_internal function, and never returns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I remove the periodic timer and invoke the code for the one shot timer, the one shot works fine, so I verified both timers work by themselves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it not possible to run 2 timers? Or a combination of timers? I have tried adjusting the timer priority (1, 2, 10)&amp;nbsp; and stack size (10k for verifying this isn't the problem), but it doesn't seem to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 17:39:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-running-a-periodic-timer-and-one-shot-timer/m-p/812781#M49332</guid>
      <dc:creator>larrydemuth</dc:creator>
      <dc:date>2018-11-07T17:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem running a periodic timer and one shot timer</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-running-a-periodic-timer-and-one-shot-timer/m-p/812782#M49333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Never mind, I found the problem. The periodic timer handler had a loop with a _time_delay function call in it, and this is no doubt messing with the timer interrupt. Have to redo it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 18:17:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-running-a-periodic-timer-and-one-shot-timer/m-p/812782#M49333</guid>
      <dc:creator>larrydemuth</dc:creator>
      <dc:date>2018-11-07T18:17:05Z</dc:date>
    </item>
  </channel>
</rss>

