How to create delays in FRDM-KE02Z

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to create delays in FRDM-KE02Z

1,148 次查看
abdulhayee
Contributor II

Hi guys

I am using FRDM-KE02Z board. I wanna ask how do i create delays in FRDM-KE02Z without using interrupts.

for example if i want 1uS delay, 5mS delay, 1Sec delay etc. How do i write a function for that?

suppose i want to toggle an LED with a rate of 30mS then how i generate this 30mS delay?

Thanks and best regards

Abdul hayee

0 项奖励
回复
2 回复数

1,012 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Abdul hayee,
You can refer the function posted by Erich.
This is related to the frequency of Core, so you need to know the configuration of ICS module.

Figure 5-1. Clocking diagram.png

Best Regards,

Robin

0 项奖励
回复

1,012 次查看
BlackNight
NXP Employee
NXP Employee

Have a look at the Wait component of the McuOnEclipse project:

McuOnEclipseLibrary/McuWait.c at master · ErichStyger/McuOnEclipseLibrary · GitHub 

I hope this helps,

Erich

0 项奖励
回复