Name

Timers — Use of on-chip timers

System Clock

The eCos kernel system clock is implemented using the BCM283X System Timer device. By default, the system timer is programmed to interrupt once every 10ms, corresponding to a 100Hz clock. This can be changed with the configuration option CYGNUM_HAL_RTC_DENOMINATOR which corresponds to the clock frequency. Other clock-related settings are recalculated automatically if the denominator is changed. The system timer is clocked at 1MHz, so there are limits on the accuracy of any frequency that is not a factor of 1000000.

The same timer is also used to implement the HAL microsecond delay function, HAL_DELAY_US. This is used by some device drivers, and in non-kernel configurations, such as RedBoot, where this timer is needed for loading program images via X/Y-modem protocols and debugging via TCP/IP. Standalone applications which require RedBoot services, such as debugging, should avoid use of this timer.

Timer-based Profiling Support

At present timer based profiling is not supported. This is mainly because the current profiling support is not SMP-aware.