I think that if your clock triggers every 100us, it's not possible to
trigger the alarm for 25us.
When you initialize an alarm, the value you pass to
cyg_alarm_initialize must be in the units the system uses. As you are using a
clock with a trigger of 100us, the time value is calculated in increments of
100us.
If you want to be able to use delays of "us", the timer must be
configured to trigger every "us". Depending on the hardware used, this
frequency of ints can make the system not to work properly, because the timer
interrupt calls some kernel functions. Be aware.
Maybe there is another way to give "us" precision to the system, but I
don't know.
Alex Bueno
-----Mensaje original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de vasantha.rajan
Enviado el: viernes, 17 de febrero de 2006 14:41
Para: [email protected]
CC: [EMAIL PROTECTED]
Asunto: [ECOS] CYGNUM_HAL_RTC_PERIOD
Hi all,
I have some doubt in CYGNUM_HAL_RTC_PERIOD. I will list my doubts
1. In my code I just want to trigger my alarm for some micro seconds (say for
25 us)
2. right now in my CDL(hal/arm/arm9/excalibur/v2_0b1/cdl) I have my
CYGNUM_HAL_RTC_NUMERATOR as 1000000000, CYGNUM_HAL_RTC_DENOMINATOR as 100. So
the clock triggers for every 10000000 ns(ie,10000 us)
3. Now I changed my CYGNUM_HAL_RTC_DENOMINATOR to 10000 so my clock will
trigger for every 100us.
4. So, In my cyg_alarm_initialize() API, if I use 25 + cyg_current_time() as my
trigger time value ,will the alarm function will be triggered in 25us????????or
my calculation is wrong??????
Thank you very much
Vasanth
-------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss