<?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: Delay function using OSIF in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/m-p/1947939#M40581</link>
    <description>&lt;P&gt;thank you so much for support. it is working perfact.&lt;/P&gt;&lt;P&gt;and i attached document below, which can help to community.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 07:12:45 GMT</pubDate>
    <dc:creator>semiconductor_user</dc:creator>
    <dc:date>2024-09-05T07:12:45Z</dc:date>
    <item>
      <title>Delay function using OSIF</title>
      <link>https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/m-p/1946299#M40497</link>
      <description>&lt;P&gt;IDE : s32ds for platform v3.5&lt;/P&gt;&lt;P&gt;MCU : s32k324&amp;nbsp;&lt;/P&gt;&lt;P&gt;here i want to use delay function by for 100ms for that i want to use OsIf but in configuration side i'm face issue, that screenshort i atteched below&lt;/P&gt;&lt;P&gt;please share example code for configuration osif and use delay function&lt;/P&gt;&lt;P&gt;or step for this procedure from configuration and which API will need.&lt;/P&gt;&lt;P&gt;please share in details so that i can easily understand and it will benificial for other more developers&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 12:43:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/m-p/1946299#M40497</guid>
      <dc:creator>semiconductor_user</dc:creator>
      <dc:date>2024-09-03T12:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Delay function using OSIF</title>
      <link>https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/m-p/1946532#M40504</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/207633"&gt;@semiconductor_user&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;In order to use the TimerClockRef, you need to add the Mcu module in the MCAL layer, which will generate the clock reference point:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_0-1725383376858.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/296882i9938375C6B2AEB48/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Julin_AragnM_0-1725383376858.png" alt="Julin_AragnM_0-1725383376858.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you have no need for the MCAL layer, you can also add the "TimerClockFreq" input:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_0-1725387751368.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/296894i4E6FBE628B723E17/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Julin_AragnM_0-1725387751368.png" alt="Julin_AragnM_0-1725387751368.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The default frequency for the system timer is 48MHz. You can use the&amp;nbsp;"OsIf_Init(NULL)" function to initialize the module, and the&amp;nbsp;APIs included in "OsIf_Timer.c" to create a delay function:&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;OsIf_GetCounter&lt;/LI&gt;
&lt;LI&gt;OsIf_MicrosToTicks&lt;/LI&gt;
&lt;LI&gt;OsIf_GetElapsed&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Julián&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 18:22:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/m-p/1946532#M40504</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2024-09-03T18:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Delay function using OSIF</title>
      <link>https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/m-p/1946880#M40533</link>
      <description>&lt;P&gt;thank you &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/200831"&gt;@Julián_AragónM&lt;/a&gt;&amp;nbsp;Julián_AragónM&amp;nbsp;for reasponse&lt;/P&gt;&lt;P&gt;i done configuration for that i added Mcu module in MCAL Layer so got McuClockRefpoint.&lt;/P&gt;&lt;P&gt;now as you say using this API i can write delay function&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;OsIf_GetCounter&lt;/LI&gt;&lt;LI&gt;OsIf_MicrosToTicks&lt;/LI&gt;&lt;LI&gt;OsIf_GetElapsed&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;i'm trying to write function but not getting clearity. do you have example code or screenshort then please share here otherwise guide me&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 05:38:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/m-p/1946880#M40533</guid>
      <dc:creator>semiconductor_user</dc:creator>
      <dc:date>2024-09-04T05:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Delay function using OSIF</title>
      <link>https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/m-p/1947476#M40568</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/207633"&gt;@semiconductor_user&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;You can implement the following code changes in a Siul2_Port_Ip_Example_S32K344 to blink a led:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;#define TIME_TYPE OSIF_COUNTER_SYSTEM

void OsIfDelay(uint32 timeoutMs);
void OsIfDelay(uint32 timeoutMs)
{
	uint32 curTime = 0u;
	uint32 endTime = 0u;
	uint32 timeoutCnt = 0u;

	curTime = OsIf_GetCounter(OSIF_COUNTER_SYSTEM);
	timeoutCnt = OsIf_MicrosToTicks(timeoutMs * 1000u, TIME_TYPE);

	while(1)
	{
		endTime += OsIf_GetElapsed(&amp;amp;curTime, TIME_TYPE);

		if(timeoutCnt &amp;lt;= endTime)
		{
			break;
		}
	}
}


/**
* @brief        Main function of the example
* @details      Initialize the used drivers and uses the OsIf
*               drivers to toggle a LED.
*/
int main(void)
{
	Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS_PortContainer_0_BOARD_InitPeripherals, g_pin_mux_InitConfigArr_PortContainer_0_BOARD_InitPeripherals);
	OsIf_Init(NULL);

	Siul2_Dio_Ip_WritePin(LED_Q172_PORT, LED_Q172_PIN, 1U);

	while(1)
	{
		OsIfDelay(1000);
		Siul2_Dio_Ip_TogglePins(LED_Q172_PORT, 1 &amp;lt;&amp;lt; LED_Q172_PIN);
	}
}&lt;/LI-CODE&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Julián&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 17:43:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/m-p/1947476#M40568</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2024-09-04T17:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Delay function using OSIF</title>
      <link>https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/m-p/1947939#M40581</link>
      <description>&lt;P&gt;thank you so much for support. it is working perfact.&lt;/P&gt;&lt;P&gt;and i attached document below, which can help to community.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 07:12:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Delay-function-using-OSIF/m-p/1947939#M40581</guid>
      <dc:creator>semiconductor_user</dc:creator>
      <dc:date>2024-09-05T07:12:45Z</dc:date>
    </item>
  </channel>
</rss>

