<?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 Re: OsIf counter issue in S32K</title>
    <link>https://community.nxp.com/t5/S32K/OsIf-counter-issue/m-p/1595964#M20523</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/194763"&gt;@zp001&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You mentioned that the values of cur_time and elapsed time are not regular, is there too much of a difference between each value? Could you share some values you got?&lt;BR /&gt;Also, may I know if you have more tasks?&lt;BR /&gt;Did you try any sample code? If the answer is yes, did you see any similar behavior?&lt;/P&gt;
&lt;P&gt;One last thing, which MCU are you using?&lt;/P&gt;
&lt;P&gt;It would be helpful if you could provide me with this information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;B.R.&lt;/P&gt;
&lt;P&gt;VaneB&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 20:36:30 GMT</pubDate>
    <dc:creator>VaneB</dc:creator>
    <dc:date>2023-02-08T20:36:30Z</dc:date>
    <item>
      <title>OsIf counter issue</title>
      <link>https://community.nxp.com/t5/S32K/OsIf-counter-issue/m-p/1595305#M20502</link>
      <description>&lt;P&gt;Hello NXP team,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;static void my_task(void *para)
{
	(void)para;
	static uint32_t cur_time = 0;
	static uint32_t prev_time = 0;
	static uint32_t cur_tick = 0;
	static uint32_t prev_tick = 0;
	static uint32_t start_time = 0;
	static uint32_t elapsed_time = 0;

	while(1)
	{
		start_time = OsIf_GetCounter(OSIF_COUNTER_SYSTEM);
		printf("start_time  %ld\r\n", start_time);
		vTaskDelayUntil( &amp;amp;xLastWakeTime, 100/ portTICK_PERIOD_MS);
		elapsed_time = OsIf_GetElapsed(&amp;amp;start_time, OSIF_COUNTER_SYSTEM);
		printf("elapsed_time  %ld deta time = %ld\r\n", elapsed_time, elapsed_time - start_time);
		prev_time = cur_time;
		cur_time = OsIf_GetCounter(OSIF_COUNTER_SYSTEM);
		printf("current time %ld prev_time %ld cur_tick %ld prev_tick %ld \r\n", cur_time, prev_time, cur_tick, prev_tick);
		printf("current time %ld\r\n", cur_time);
	}
}&lt;/LI-CODE&gt;&lt;P&gt;my_task is scheduled about every 100ms,the question is the values of cur_time and elapsed time are not regular.&lt;/P&gt;&lt;P&gt;I'd like to know how to get system tick.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 06:51:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/OsIf-counter-issue/m-p/1595305#M20502</guid>
      <dc:creator>zp001</dc:creator>
      <dc:date>2023-02-08T06:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: OsIf counter issue</title>
      <link>https://community.nxp.com/t5/S32K/OsIf-counter-issue/m-p/1595964#M20523</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/194763"&gt;@zp001&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You mentioned that the values of cur_time and elapsed time are not regular, is there too much of a difference between each value? Could you share some values you got?&lt;BR /&gt;Also, may I know if you have more tasks?&lt;BR /&gt;Did you try any sample code? If the answer is yes, did you see any similar behavior?&lt;/P&gt;
&lt;P&gt;One last thing, which MCU are you using?&lt;/P&gt;
&lt;P&gt;It would be helpful if you could provide me with this information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;B.R.&lt;/P&gt;
&lt;P&gt;VaneB&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 20:36:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/OsIf-counter-issue/m-p/1595964#M20523</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-02-08T20:36:30Z</dc:date>
    </item>
  </channel>
</rss>

