User`s guide
3 Porting a BSP to Custom Hardware
3.3 Finalizing Your BSP
107
3
AUX_CLK_RATE_MIN
Defines the minimum rate at which the auxiliary clock can run. To support
spy( ),
AUX_CLK_RATE_MIN must be less than or equal to 100 Hz.
AUX_CLK_RATE_MAX
Defines the maximum rate at which the auxiliary clock can run. To support
spy( ),
AUX_CLK_RATE_MAX must be greater than or equal to 100 Hz.
Power Management
In order to support the long power management features of VxWorks 6.0, a BSP
must provide a one-shot timer. For more information on power management, see
the VxWorks Kernel Programmer’s Guide: Kernel.
One-Shot Timer
Implementing power management in your BSP requires a one-shot timer to
support long power management. This timer can be implemented using a spare
timer, or the system tick timer can be reconfigured during sleep cycles for a longer
timeout. The specific implementation is hardware-dependent. Careful design of
this timer is necessary to ensure that system time is corrected after alternate sleep
and busy cycles. If the clock reference of the system and one-shot timers is not the
same, conversion errors can lead to accuracy problems.
Remember that service of the one-shot timer is in a critical path. In order to
preserve system performance, it is important that the service routines execute
quickly. Avoid time consuming operations such as floating-point.
One-shot timer support is provided using the following API, which must be
provided by the BSP.
sysOneShotEnable( )
This routine is called by power management when the system enters the idle
state. Time is passed as an argument. The one-shot timer is programmed to
wake the system up at the specified interval and the system tick timer
interrupt is disabled. The kernel rescheduler uses this service only if the idle
period is scheduled for more than one tick. This avoids a possible race
condition when the time remaining on the system clock is very short.
sysOneShotDisable( )
This routine is called by power management when the system wakes up. It
re-computes current time, disables the one-shot timer, and re-enables the
system tick timer.