Keil Logo

_sleep_

Summary
void _Sleep_ (ulong milliseconds) /* Delay script n milliseconds */
Description

The _sleep_ function may be used to delay script execution in debug functions or signal functions. The _sleep_ function is useful to allow small delays in the script language execution and can be used in simulation mode and target debugging mode.

Return Value

None

Example

The following script switches the oscillator on an ARM device for fast download speed.

// Switching from Slow Clock to Main Oscillator for faster Downloading
_WDWORD(0xFFFF4020, 0x002F0002);     // APMC_CGMR: Enable Main Oscillator
_sleep_(10);                         // Wait for stable Main Oscillator
_WDWORD(0xFFFF4020, 0x002F4002);     // APMC_CGMR: Switch to Main Oscillator
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.