ファームウェア関数一覧

TIM_CounterModeConfig

ヘッダ宣言

関数プロトタイプ

void TIM_CounterModeConfig(TIM_TypeDef* TIMx, uint16_t TIM_CounterMode)

動作

  • タイマの使用するカウントモードの選択をします。

引数

  • TIMx
    使用するカウントモードの選択を設定するタイマ周辺回路をTIM1~TIM5,TIM8から指定します。

    TIMx説明
    TIM1タイマ1
    TIM2タイマ2
    TIM3タイマ3
    TIM4タイマ4
    TIM5タイマ5
    TIM8タイマ8

  • TIM_CounterMode
    タイマのカウンタモードを以下のマクロから選択します。

    TIM_CounterMode説明
    TIM_Counter_Upアップ・カウンタ・モード
    TIM_Counter_Downダウン・カウンタ・モード
    TIM_Counter_CenterAligned1CenterAligned Mode1
    ダウン中のみキャプチャ・コンペア割り込みが発生する
    TIM_Counter_CenterAligned2CenterAligned Mode2
    アップ中のみキャプチャ・コンペア割り込みが発生する
    TIM_Counter_CenterAligned3CenterAligned Mode3
    アップ・ダウン共にキャプチャ・コンペア割り込みが発生する

出力値

  • 無し

戻り値

  • 無し

場所

呼び出し関数

  • 無し

サンプル

/* Selects the Center Aligned counter Mode 1 for the TIM1 */
TIM_CounterModeConfig(TIM1, TIM_Counter_CenterAligned1);

参照

  • STMマイコン徹底入門 P.

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2011-10-14 (金) 16:15:53