<?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>MCUXpresso SDK中的主题 Re: FreeRTOS vTaskDelay different cpu frequency K22FX</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/FreeRTOS-vTaskDelay-different-cpu-frequency-K22FX/m-p/694998#M261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes i need to generate some delay in ms but i don't understand how it generate the tick interrupt that increment this. My question is then what timer freertos use to generate the TICK_RATE? It use the&amp;nbsp;System Tick Timer of the cpu or normaly use a software interrupt that increment a variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE: i have read that with ARM the freeRTOS use the&amp;nbsp;&lt;SPAN&gt;System Tick Timer, so by default i have the&amp;nbsp;configTICK_RATE_HZ set to 1000. If my CPU work at 120Mhz i have to set this variable at 120Mhz ... right?&amp;nbsp;After that i can use the pdMS_TO_TICKS function to convert my delay in ms&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Oct 2017 10:30:33 GMT</pubDate>
    <dc:creator>ypkdani</dc:creator>
    <dc:date>2017-10-04T10:30:33Z</dc:date>
    <item>
      <title>FreeRTOS vTaskDelay different cpu frequency K22FX</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/FreeRTOS-vTaskDelay-different-cpu-frequency-K22FX/m-p/694996#M259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i have a K22FX with FreeRTOS. I use this cpu at different frequency (120Mhz,16Mhz, 4Mhz). For have a costant delay with this different setting what i have to do?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my function i use :&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;vTaskDelay(100 / portTICK_RATE_MS); //100ms&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;for have a xxx ms of delay.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;portTICK_RATE_MS is defined as portTICK_PERIOD_MS&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;portTICK_PERIOD_MS&lt;SPAN&gt;&amp;nbsp; as&amp;nbsp;&lt;/SPAN&gt;( ( TickType_t ) 1000 / configTICK_RATE_HZ )&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;where&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;configTICK_RATE_HZ ((TickType_t)1000)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It's right if i set&amp;nbsp;configTICK_RATE_HZ as my CPU frequency in Hz?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 13:27:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/FreeRTOS-vTaskDelay-different-cpu-frequency-K22FX/m-p/694996#M259</guid>
      <dc:creator>ypkdani</dc:creator>
      <dc:date>2017-09-28T13:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS vTaskDelay different cpu frequency K22FX</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/FreeRTOS-vTaskDelay-different-cpu-frequency-K22FX/m-p/694997#M260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[Luckily, every time I try and use this forum I have to reset my password.&amp;nbsp; Thought that had been fixed.&amp;nbsp; Gets a bit boring.]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find your post confusing.&amp;nbsp; If you want to change the clock frequency, or just generally as good practice, you should specify times in milliseconds rather than ticks. For many years the preferred way of doing that is to specify times using the pdMS_TO_TICKS() macro.&amp;nbsp; Look it up on Google or in the &lt;A href="http://www.freertos.org/Documentation/RTOS_book.html"&gt;free FreeRTOS book&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In all cases you have to set configCPU_CLOCK_HZ and configTICK_RATE_HZ correctly so the RTOS can set up the configuration you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 18:04:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/FreeRTOS-vTaskDelay-different-cpu-frequency-K22FX/m-p/694997#M260</guid>
      <dc:creator>FreeRTOS_org</dc:creator>
      <dc:date>2017-09-28T18:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS vTaskDelay different cpu frequency K22FX</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/FreeRTOS-vTaskDelay-different-cpu-frequency-K22FX/m-p/694998#M261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes i need to generate some delay in ms but i don't understand how it generate the tick interrupt that increment this. My question is then what timer freertos use to generate the TICK_RATE? It use the&amp;nbsp;System Tick Timer of the cpu or normaly use a software interrupt that increment a variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE: i have read that with ARM the freeRTOS use the&amp;nbsp;&lt;SPAN&gt;System Tick Timer, so by default i have the&amp;nbsp;configTICK_RATE_HZ set to 1000. If my CPU work at 120Mhz i have to set this variable at 120Mhz ... right?&amp;nbsp;After that i can use the pdMS_TO_TICKS function to convert my delay in ms&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 10:30:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/FreeRTOS-vTaskDelay-different-cpu-frequency-K22FX/m-p/694998#M261</guid>
      <dc:creator>ypkdani</dc:creator>
      <dc:date>2017-10-04T10:30:33Z</dc:date>
    </item>
  </channel>
</rss>

