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.
- Configure the interval period in XTimer_SetInterval API
- Register the internal timer handler in XTimer_SetHandler API. This API is executed when the interval time expires.
XilTimer provides the following user configuration BSP settings.
Note: By default, XilTimer library is disabled. You can enable it through the library software configuration wizard.
Table : BSP Configuration Settings
Parameter Name | Type | Description |
---|---|---|
sleep timer | peripheral_instance | This parameter is used to select specific timer for sleep functionality |
interval_timer | peripheral_instance | This parameter is used to select specific timer for interval timer functionality |
en_interval_timer | bool | This parameter enables Interval Time (Default value is false) |