KSDK 2.1 Time Management

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KSDK 2.1 Time Management

773 Views
anbui
Contributor II

What is the equivalent time management functions like OSA_TimeDelay() ?

Labels (1)
0 Kudos
1 Reply

450 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, AnBui,

I think the OSA_TimeDelay()  api function is the function of SDK1.3, if you use SDK2.1 with FreeRtos, you can use the function vTaskDelay();

This page describes the RTOS vTaskDelay() FreeRTOS API function which is part of the RTOS task control API. FreeRTOS is a professional grade, small footprint, open source RTOS for microcontrollers.

Example usage:
 void vTaskFunction( void * pvParameters )  {  /* Block for 500ms. */ const TickType_t xDelay = 500 / portTICK_PERIOD_MS;       for( ;; )      {          /* Simply toggle the LED every 500ms, blocking between each toggle. */         vToggleLED();          vTaskDelay( xDelay );      } }

Hope it can help you

BR

xiangjun Rong

0 Kudos