<?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 MicrocontrollersのトピックRe: KL25Z, SysTick problem.</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268520#M8902</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you should set 1's to GPIOB_PTOR related bit to toggle an IO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;void SysTick_Handler()&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //LED TOGGLE&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOB_PTOR |= (1&amp;lt;&amp;lt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Feb 2013 08:53:38 GMT</pubDate>
    <dc:creator>zhaohuiliu</dc:creator>
    <dc:date>2013-02-22T08:53:38Z</dc:date>
    <item>
      <title>KL25Z, SysTick problem.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268519#M8901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Hello everyone,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;bellow I wrote my SysTick code. It's works but i have problem with time couting:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-family: inherit;"&gt;#include "derivative.h"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;void SysTick_Handler()&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;{&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //LED TOGGLE&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOB_PTOR |= (1&amp;lt;&amp;lt;0);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;}&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int main(void){&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SYST_RVR = SysTick_RVR_RELOAD(6000000);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SYST_CVR = SysTick_CVR_CURRENT(0);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SYST_CSR |= SysTick_CSR_ENABLE_MASK | SysTick_CSR_TICKINT_MASK | SysTick_CSR_CLKSOURCE_SHIFT;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;){}&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;&lt;EM style="font-family: inherit;"&gt;}&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Default i have 48MHz system clock and 8MHz external oscillator. Why LED doesn't toggle once for a second (now it's mutch longer)? Maybe I forgot about something important?&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 21:51:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268519#M8901</guid>
      <dc:creator>madagaskar</dc:creator>
      <dc:date>2013-02-21T21:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z, SysTick problem.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268520#M8902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you should set 1's to GPIOB_PTOR related bit to toggle an IO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;void SysTick_Handler()&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //LED TOGGLE&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOB_PTOR |= (1&amp;lt;&amp;lt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 08:53:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268520#M8902</guid>
      <dc:creator>zhaohuiliu</dc:creator>
      <dc:date>2013-02-22T08:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z, SysTick problem.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268521#M8903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is with the SysTick_CSR_CLKSOURCE_SHIFT being orred into SYST_CSR. It actually needs to be SysTick_CSR_CLKSOURCE_MASK or (1&amp;lt;&amp;lt;SysTick_CSR_CLKSOURCE_SHIFT)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 15:45:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268521#M8903</guid>
      <dc:creator>ndavies</dc:creator>
      <dc:date>2013-02-22T15:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z, SysTick problem.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268522#M8904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I wrote: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SYST_CSR |= SysTick_CSR_ENABLE_MASK | SysTick_CSR_TICKINT_MASK | &lt;STRONG&gt;SysTick_CSR_CLKSOURCE_MASK&lt;/STRONG&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only changed frequency source from external reference clock to processor clock. Of course again i didn't have one second toggling. It look's like problem with processor clock frequency. Maybe default it doesn't be a 48MHz? Or I should count new value for SysTick_RVR_RELOAD ?(I tried but it doesn't help) Now I haven't any different idea how to fix it.:/&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 22:37:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268522#M8904</guid>
      <dc:creator>madagaskar</dc:creator>
      <dc:date>2013-02-22T22:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z, SysTick problem.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268523#M8905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you initializing the clock? You need code to set 48Mhz, in other words, the processor does not "default" to 48 Mhz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where is LED connected? Hard to say if the code is correct if you don't tell us more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the systick is running from a 48Mhz processor, then 6,000,000 will give 8 ticks per second. Note that this counter is only 24 bits, so you can't get a 1 second tick from a 48Mhz clock.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2013 01:43:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268523#M8905</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-02-23T01:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z, SysTick problem.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268524#M8906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't initialize the clock because I was thinking that it wasn't necessary. I found an example for systick and they use Multipurpose Clock Generator module(MCG) but it's still doesn't work. Maybe you could write me a code to set processor clock or some more advices how can I do that with reference manual? And one more question. What is the value of processor clock frequency when I don't initialize the clock? In &lt;STRONG&gt;&lt;EM&gt;systick.rar&lt;/EM&gt;&lt;/STRONG&gt; is my project.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Feb 2013 21:15:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268524#M8906</guid>
      <dc:creator>madagaskar</dc:creator>
      <dc:date>2013-02-24T21:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z, SysTick problem.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268525#M8907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I run your project the RED led blinks at about 1HZ, so there is really nothing for me to tell you to change.&lt;/P&gt;&lt;P&gt;:smileyhappy:&lt;/P&gt;&lt;P&gt;Also, on the GPIOB_PCOR, GPIOB_PSOR and GPIOB_PTOR register you should NOT use the 'or' operator, as these registers only change bits that are a "1", so read/modify/write is not required and could cause problems (it is ok in this case as read returns all 0's). Bits that are 0 cause no change. There are some registers that are only change on 1 that do not read back 0's. In any event, it does waste cycles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You did a great job of figuring this out on your own.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 01:28:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268525#M8907</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-02-25T01:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z, SysTick problem.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268526#M8908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To set processor clock I used code from example project.;) You said that the red led blinks at about 1Hz. I'm realy suprising because it's still doesn't work correctly.:/ Maybe it's hardware problem...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 05:30:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268526#M8908</guid>
      <dc:creator>madagaskar</dc:creator>
      <dc:date>2013-02-25T05:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z, SysTick problem.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268527#M8909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the content of your derivatives.h? can you upload it? thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 10:26:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-SysTick-problem/m-p/268527#M8909</guid>
      <dc:creator>hunter18</dc:creator>
      <dc:date>2016-07-28T10:26:09Z</dc:date>
    </item>
  </channel>
</rss>

