[[ファームウェア関数一覧>ファームウェア関数一覧#d5c56b4f]] *TIM_BDTRConfig [#ad92accc] #contents **ヘッダ宣言 [#zc3a39af] **関数プロトタイプ [#c4b665f6] void TIM_BDTRConfig(TIM_TypeDef* TIMx, TIM_BDTRInitTypeDef *TIM_BDTRInitStruct) **動作 [#z3143f9c] - **引数 [#w018bc95] -TIMx&br; タイマ周辺回路をTIMxで指定します。&br; xは1, 2, 3, 4, 5, 6, 7, 8を選択できます。&br; -TIM_BDTRInitStruct '''stm32f10x_tim.h'''で定義されている構造体です。 typedef struct { uint_t16 TIM_OSSRState; uint_t16 TIM_OSSIState; uint_t16 TIM_LOCKLevel; uint_t16 TIM_DeadTime; uint_t16 TIM_Break; uint_t16 TIM_BreakPolarity; uint_t16 TIM_AutomaticOutput; uint16_t TIM_OSSRState; uint16_t TIM_OSSIState; uint16_t TIM_LOCKLevel; uint16_t TIM_DeadTime; uint16_t TIM_Break; uint16_t TIM_BreakPolarity; uint16_t TIM_AutomaticOutput; } TIM_BDTRInitTypeDef; --TIM_OSSRState |CENTER:TIM_OSSRState|CENTER:説明|h |TIM_OSSRState_Enable|TIM OSSR State is enabled| |TIM_OSSRState_Disable|TIM OSSR State is disabled| #include(Macro/TIM_OSSRState,notitle) --TIM_OSSIState |CENTER:TIM_OSSIState|CENTER:説明|h |TIM_OSSIState_Enable|TIM OSSI State is enabled| |TIM_OSSIState_Disable|TIM OSSI State is disabled| #include(Macro/TIM_OSSIState,notitle) --TIM_LOCKLevel |CENTER:TIM_LOCKLevel|CENTER:説明|h |TIM_LOCKLevel_OFF|No bit is locked.| |TIM_LOCKLevel_1|LOCK level 1 is used.| |TIM_LOCKLevel_2|LOCK level 2 is used.| |TIM_LOCKLevel_3|LOCK level 3 is used.| #include(Macro/TIM_LOCKLevel,notitle) --TIM_DeadTime --TIM_Break |CENTER:TIM_Break|CENTER:説明|h |TIM_Break_Enable|TIM Break Input is enabled| |TIM_Break_Disable|TIM Break Input is disabled| #include(Macro/TIM_Break,notitle) --TIM_BreakPolarity |CENTER:TIM_BreakPolarity|CENTER:説明|h |TIM_BreakPolarity_Low|Sets the TIM Break input pin polarity to low.| |TIM_BreakPolarity_High|Sets the TIM Break Input pin polarity to high.| #include(Macro/TIM_BreakPolarity,notitle) --TIM_AutomaticOutput |CENTER:TIM_AutomaticOutput|CENTER:説明|h |TIM_AutomaticOutput_Enable| Enables the TIM Automatic Output.| |TIM_AutomaticOutput_Disable| Disables the TIM Automatic Output.| #include(Macro/TIM_AutomaticOutput,notitle) **戻り値 [#ceee36cd] -無し **場所 [#w6073eef] **呼び出し関数 [#yc02cbf8] -無し **サンプル [#v7ac6c0f] /* OSSR, OSSI, Automatic Output enable, Break, dead time and Lock Level configuration*/ TIM_BDTRInitTypeDef TIM_BDTRInitStructure; TIM_BDTRInitStructure.TIM_OSSRState = TIM_OSSRState_Enable; TIM_BDTRInitStructure.TIM_OSSIState = TIM_OSSIState_Enable; TIM_BDTRInitStructure.TIM_LOCKLevel = TIM_LOCKLevel_1; TIM_BDTRInitStructure.TIM_DeadTime = 0x05; TIM_BDTRInitStructure.TIM_Break = TIM_Break_Enable; TIM_BDTRInitStructure.TIM_BreakPolarity = TIM_BreakPolarity_High; TIM_BDTRInitStructure.TIM_AutomaticOutput = TIM_AutomaticOutput_Enable; TIM_BDTRConfig(TIM1, &TIM_BDTRInitStructure); **参照 [#mf96922a] -STMマイコン徹底入門 P.