How to calculate the machine cycles to write a delay function with codewarrior?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to calculate the machine cycles to write a delay function with codewarrior?

ソリューションへジャンプ
1,257件の閲覧回数
修華許
Contributor III

I use a FRDM-KE06Z board to develop a application.

I can't find any predefined like delay_ms() or delay()

Any good way to calculate the machine cycles that I can write a delay function easily?

ラベル(1)
1 解決策
1,066件の閲覧回数
BlackNight
NXP Employee
NXP Employee

You might have a look at the open source Wait Processor Expert component which is available on SourceForge, see

McuOnEclipse Releases on SourceForge | MCU on Eclipse

It comes with various busy wait routines:

pastedImage_1.png

If you are not using Processor Expert: you simply generate the code and use the WAIT1.c and WAIT1.h files in your project.

I hope this helps,

Erich

元の投稿で解決策を見る

1 返信
1,067件の閲覧回数
BlackNight
NXP Employee
NXP Employee

You might have a look at the open source Wait Processor Expert component which is available on SourceForge, see

McuOnEclipse Releases on SourceForge | MCU on Eclipse

It comes with various busy wait routines:

pastedImage_1.png

If you are not using Processor Expert: you simply generate the code and use the WAIT1.c and WAIT1.h files in your project.

I hope this helps,

Erich