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]

hal_delay_us doesn't work on PPC decrementer interrupt not 100Hz


Hello,

Been looking at the code in packages/hal/powerpc/arch/src/hal_intr.c that calculates how many decrementer ticks are need to delay a us and it appears to be hard coded for CYGNUM_HAL_RTC_PERIOD corresponds to 10,000us

To cope with this changing in the CDL I believe the code should be:

ticks_per_us = ((long long)1 * (CYGNUM_HAL_RTC_PERIOD * CYGNUM_HAL_RTC_DENOMINATOR)) / (CYGNUM_HAL_RTC_NUMERATOR / 1000);

Does this change make sense or is there some reason it won't work?

Thanks
Will

--
------------------------------------------------------------------------
Will Wagner                                     will_wagner@carallon.com
Development Manager                      Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------



--
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]