- typedef struct
- {
- uint16_t TIM_Prescaler;
- uint16_t TIM_CounterMode;
- uint32_t TIM_Period;
- uint16_t TIM_ClockDivision;
- uint8_t TIM_RepetitionCounter;
- } TIM_TimeBaseInitTypeDef;
復(fù)制代碼 TIM_Prescaler:定時(shí)器預(yù)分頻系數(shù),0x0000- 0xFFFF。
TIM_CounterMode:計(jì)數(shù)模式,可選擇向上計(jì)數(shù) 、向下計(jì)數(shù)和中央對其模式。
TIM_Period:定時(shí)器自動(dòng)重載值,0x0000- 0xFFFF
TIM_ClockDivision:時(shí)鐘分頻因子,可選擇1、2和4分頻。
TIM_RepetitionCounter:重復(fù)計(jì)數(shù)值,重復(fù)溢出相應(yīng)的次數(shù),進(jìn)入中斷。
五、 實(shí)驗(yàn)現(xiàn)象
iCore3 雙核心板三色LED每500ms交替閃爍。
六、 代碼包下載