Overview - 2022.1 English

Xilinx Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2022-04-21
Version
2022.1 English
The XilTimer library provides sleep and interval timer functionality, Hardware and Software features are differentiated using a layered approach. The top Level layer is platform-agnostic where the core layer (low level) is hardware dependent.
Note: Currently, this library supports TTC, scutimer, and axi_timer IPs.
If none of the above-mentioned IPs are present in a given design, then the sleep functionality will be executed using processor instructions. For the sleep and tick functionality, you can select a specific timer using the library software configuration wizard. The following figure illustrates the XilTimer functionality.
Figure 1. XilTimer Library

For using sleep functionality, you can use sleep, msleep, or usleep APIs that provide delay in multiples of seconds, milliseconds, and microseconds.

For configuring interval timer functionality, execute the following steps.

  1. Configure the interval period in XTimer_SetInterval API
  2. Register the internal timer handler in XTimer_SetHandler API. This API is executed when the interval time expires.
Note: By default, XilTimer library is disabled. You can enable it through the library software configuration wizard.