Hello, Please. There is a 100us delay function in Kinetis Design Studio? (With ProcessorExpert) I have not found. Function: "Cpu_Delay100us()", as it was in the CodeWarrior? Thank's.
In general, we use the the following code to delay the mcu. I do not think we have the other methods to delay the MCU.
#define N 1000
for(i=0; i<N; i++)
__asm("nop"); //in CW tools use asm("nop");
Do you sue the KSDK PE or only PE ?
If use the KSDK PE, this the function "void OSA_TimeDelay(uint32_t delay);" under the "fsl_os_abstraction "component .
While if use only PE , it seems not , while i searched this :No more delay component for CPU? It is about install "wait " component to CW ,
while the KDS is the lite of CW , so you can try .
Hope it helps
There is a WAIT Processor Expert component available which implements busy waiting in a loop:
That component is available in a set of other components on SourceForge (McuOnEclipse - Browse /PEx Components at SourceForge.net), see McuOnEclipse Releases on SourceForge | MCU on Eclipse
I hope this helps,
Xiangjun did not know how to create this delay, because I did not know this syntax. With your help, I can test in practice with oscilloscope and set the appropriate value of the constant (uC with internal oscillator).
Alice and Erich, had imported the component of the CodeWarrior, downloaded in MCUoneclipse, but did not work, now with this new update solved the problem, as you can see in the attached image.
Thank you for the help of all of you.
Was developing a routine (library ".c" and ".h") for serial communication using a pin any of a micro, will be used in CodeWarrior. But took the opportunity to test the KDS. Further, plan to use these Kinetis and KDS IDE.
Erich, your site is very interesting, all information I found there to this day, have always been very helpful.
yes, for the actual gcc/GNU compiler settings it is necessary to use __asm() in KDS (before it was ok just to use asm()).
So it looks you had some older components.
Glad to hear that things are resolved :-).
But keep in mind that the WAIT delay is about +/- 10% accurate, depending on your interrupt load. If you need more precision, use a timer interrupt instead.
Retrieving data ...