In built delay function

cancel
Showing results for 
Search instead for 
Did you mean: 

In built delay function

973 Views
durgasivakrishn
Contributor III

Hi,

I am using MK66FN2M0VLQ18 for my application I need to use milliseconds and microseconds delay in the application I want to use inbuilt delay functions as in STM32F7 (HAL_Delay) I am not interested to use PIT Timers for this purpose can anyone suggest me something. And is there any inbuilt function to have such kind of delay in MK66 SDK.

Looking forward to your reply,

Regards,

B.Durga sivakrishna

0 Kudos
3 Replies

591 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Durga,

No, NXP Kinetis SDK hasn't such a function. But I think this is not a big problem. HAL_Delay use Systick to count time. It looks like

__weak void HAL_Delay(__IO uint32_t Delay)
{
  uint32_t tickstart = 0;
  tickstart = HAL_GetTick();
  while((HAL_GetTick() - tickstart) < Delay)
  {
  }
}

You can do it by yourself.

Regards,

Jing

591 Views
durgasivakrishn
Contributor III

Hi Jing,

Thanks for your reply, my doubt clarified.

Regards,

B.Durga sivarkrishna

0 Kudos

591 Views
mjbcswitzerland
Specialist V
0 Kudos