Keil Logo

_sleep_

概要
void _Sleep_ (ulong milliseconds) /* Delay script nmilliseconds */
説明

_sleep_ 関数は、デバッグ関数またはシグナル関数でスクリプトの実行を遅らせるために使用できます。_sleep_ 関数は、スクリプト言語の実行に短い遅延を含める場合に便利です。シミュレーションモードとターゲットデバッグモードで使用できます。

戻り値

なし

以下のスクリプトは、ARM デバイスのオシレータを切り替えて高速ダウンロードを可能にします。

// 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.