For using sleep functionality, sleep, msleep, or
usleep APIs provide delay in multiples of seconds, milliseconds, and
microseconds.
For configuring interval timer functionality, execute the following steps.
- Configure the interval period in
XTimer_SetIntervalAPI - Register the internal timer handler in
XTimer_SetHandlerAPI. This API is executed when the interval time expires.
Note: By default, XilTimer library is disabled in the Vitis classic flow except for the
FreeRTOS hello world template app. You can enable it through the library software
configuration wizard as needed. However, in Vitis Unified IDE flow, the xiltimer library is
enabled by default and all the sleep and ticktimer functionality is acheived through the
use of this library.
XilTimer provides the following user configuration BSP settings.
| Parameter Name | Type | Description |
|---|---|---|
| sleep timer | peripheral_instance | This parameter selects specific timer for sleep functionality |
| interval_timer | peripheral_instance | This parameter selects specific timer for interval timer functionality |
| en_interval_timer | bool | This parameter enables Interval Time (Default value is false) |
For more information on BSP configuration, see Setting Up Software System in the Vitis Unified IDE.