M01_TRGO_UEV(void) 是什么意思,主要实现什么功能
void Sample_TM01_TRGO_UEV(void)
{
TM_TimeBaseInitTypeDef TM_TimeBase_InitStruct;
TM_TimeBaseStruct_Init(&TM_TimeBase_InitStruct);
TM_TimeBase_InitStruct.TM_Period = Simple_Period_MainCounter - 1;
TM_TimeBase_InitStruct.TM_Prescaler = Simple_Period_Prescaler - 1;
TM_TimeBase_InitStruct.TM_CounterMode = Cascade;
TM_TimeBase_Init(TM01, &TM_TimeBase_InitStruct);
TM_ClearFlag(TM01, TMx_TOF);
// 3.select TRGO_UEV of TRGO
TM_TRGO_Select(TM01, TRGO_UEV);
TM_UEV_Config(TM01, UEV_TOF);
TM_UEV_Cmd(TM01, ENABLE);
// ----------------------------------------------------
// 4.Start TM01
TM_Timer_Cmd(TM01, ENABLE);
return;
}
|