This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: CYGNUM_HAL_RTC_PERIOD


	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: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org] En nombre de vasantha.rajan
Enviado el: viernes, 17 de febrero de 2006 14:41
Para: ecos-discuss@ecos.sourceware.org
CC: gary@mlbassoc.com
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]